问题
Here is my git url as reported by Azure TFS:
https://mycompany@dev.azure.com/mycompany/myproject/_git/myproject
Here is my clone command
git clone https://myusername:mypass@mycompany@dev.azure.com/mycompany/myproject/_git/myproject
However, I am unable to access the repository. The error is:
Could not resolve host: mycompany@dev.azure.com
Can someone please suggest how to overcome this? Regards.
回答1:
This was from the hint in phd's comment. Turns out, Azure generated url is somewhat misleading. Instead of,
https://mycompany@dev.azure.com/mycompany/myproject/_git/myproject
it should really be:
https://dev.azure.com/mycompany/myproject/_git/myproject
This way, the following would work:
https://myuser:mypass@dev.azure.com/mycompany/myproject/_git/myproject
来源:https://stackoverflow.com/questions/54712941/cloning-azure-git-repository-reports-could-not-resolve-host