Could not resolve host: bitbucket.org; nodename nor servname provided, or not known

匿名 (未验证) 提交于 2019-12-03 08:44:33

问题:

This error comes up every time I try clone any repo from Bitbucket using terminal:

$ git clone https://me@bitbucket.org/me/myrepo.git Cloning into 'blog'... fatal: unable to access 'https://me@bitbucket.org/me/myrepo.git': Could not  resolve host: bitbucket.org; nodename nor servname provided, or not known 

I had the same problem with GitHub resolved by replacing 'http' with 'git' protocol which was great! But when I tried that on Bitbucket I got this:

git clone git://me@bitbucket.org/me/myrepo.git Cloning into 'blog'... fatal: Unable to look up me@bitbucket.org (port 9418) (nodename nor servname  provided, or not known) 

So I removed 'me@', making it the same as the actual webpage, and the operation just times out. Help?

回答1:

In your ~/.gitconfig, is there an [http] section with a proxy entry in it? If so, that may be the source of your trouble. (I extracted this idea from a help page link posted above.)



回答2:

When cloning from Bitbucket via a terminal on mac osx, only http is supported, not https.

You should be able to use the exact same command just using http.

The Bitbucket repository overview webpage gives a clone command that includes https. On Mac, just remove the 's'.



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