git 克隆命令不起作用?
git clone command is not working?
我正在尝试克隆位桶存储库。安装 git 后执行以下命令后,我将面临以下问题:
$ git clone https://usernam@bitbucket.org/username/reponame.git
Error :fatal: unable to access'https://username@bitbucket.org/username/reponame.git/':
Failed to connect to hostname port 8000: Connection refused
如何克服此错误消息?
一个 https url 应该尝试联系端口 443。
如果它尝试联系 8000,则可能表示中间代理:检查 git config -l|grep -i proxy
,或您的环境变量 (env or set|grep -i proxy
)
您也可以尝试 curl -L -v https://usernam@bitbucket.org/username/reponame.git
以获得更多信息。
最后,如果 https 不起作用,请不要忘记尝试通过 ssh 进行克隆:参见“Set up SSH for Git”和 git clone git@bitbucket.org:user/repo.git
。
修改您的 url 以使用 git 或 ssh 协议进行传输。
例如
git 克隆 https://github.com/abcd/bashScripts.git
变为:
git 克隆 git@github.com:abcd/bashScripts.git
我正在尝试克隆位桶存储库。安装 git 后执行以下命令后,我将面临以下问题:
$ git clone https://usernam@bitbucket.org/username/reponame.git
Error :fatal: unable to access'https://username@bitbucket.org/username/reponame.git/':
Failed to connect to hostname port 8000: Connection refused
如何克服此错误消息?
一个 https url 应该尝试联系端口 443。
如果它尝试联系 8000,则可能表示中间代理:检查 git config -l|grep -i proxy
,或您的环境变量 (env or set|grep -i proxy
)
您也可以尝试 curl -L -v https://usernam@bitbucket.org/username/reponame.git
以获得更多信息。
最后,如果 https 不起作用,请不要忘记尝试通过 ssh 进行克隆:参见“Set up SSH for Git”和 git clone git@bitbucket.org:user/repo.git
。
修改您的 url 以使用 git 或 ssh 协议进行传输。
例如 git 克隆 https://github.com/abcd/bashScripts.git
变为:
git 克隆 git@github.com:abcd/bashScripts.git