克隆Azure git存储库报告“无法解析主机". [英] Cloning Azure git repository reports "could not resolve host"

查看:97
本文介绍了克隆Azure git存储库报告“无法解析主机".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是Azure TFS报告的我的git网址:

Here is my git url as reported by Azure TFS:

https://mycompany@dev.azure.com/mycompany/myproject/_git/myproject

这是我的克隆命令

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.

推荐答案

这是来自phd注释中的提示.事实证明,Azure生成的URL有点误导.代替

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

它确实应该是:

https://dev.azure.com/mycompany/myproject/_git/myproject

这样,以下方法将起作用:

This way, the following would work:

https://myuser:mypass@dev.azure.com/mycompany/myproject/_git/myproject

这篇关于克隆Azure git存储库报告“无法解析主机".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆