每次我尝试使用终端从 Bitbucket 克隆任何存储库时都会出现此错误:
$ 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
我在 GitHub 上遇到了同样的问题,通过将"http"替换为"git"协议来解决,这很棒!但是当我在Bitbucket上尝试时,我得到了这个:
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)
所以我删除了"me@",使其与实际网页相同,操作只是超时。帮助?
在您的~/.gitconfig
中,是否有一个[http]
部分包含proxy
条目?如果是这样,那可能是你麻烦的根源。(我从上面发布的帮助页面链接中提取了这个想法。
当通过 mac osx 上的终端从 Bitbucket 克隆时,仅支持 http,不支持 https。
您应该能够仅使用 http 使用完全相同的命令。
Bitbucket 存储库概述网页给出了包含 https 的克隆命令。在 Mac 上,只需删除"s"。