Cloning Azure git repository reports “could not resolve host”

牧云@^-^@ 提交于 2020-06-28 06:07:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!