简体   繁体   English

git clone命令不起作用?

[英]git clone command is not working?

I am trying to clone bit bucket repo. 我正在尝试克隆比特桶回购。 Once I execute the following command after installing git I am facing following issue : 一旦我在安装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

How can I get past this error message? 如何通过此错误消息?

An https url should attempt to contact the port 443. https网址应尝试联系端口443。

If it tries to contact 8000, that might indicate an intermediate proxy: check git config -l|grep -i proxy , or your environment variable ( env or set|grep -i proxy ) 如果它试图联系8000,那可能表示一个中间代理:检查git config -l|grep -i proxy ,或你的环境变量( env or set|grep -i proxy

You can also try a curl -L -v https://usernam@bitbucket.org/username/reponame.git to have more information. 您也可以尝试使用curl -L -v https://usernam@bitbucket.org/username/reponame.git获取更多信息。

Finally, don't forget to try and clone through ssh if https does not want to work: see " Set up SSH for Git ", and git clone git@bitbucket.org:user/repo.git . 最后,如果https不想工作,请不要忘记尝试通过ssh进行克隆:请参阅“ 为Git设置SSH ”和git clone git@bitbucket.org:user/repo.git

Modify your url to use git or ssh protocol for transfer. 修改您的网址以使用git或ssh协议进行传输。

eg git clone https://github.com/abcd/bashScripts.git 例如git clone https://github.com/abcd/bashScripts.git

becomes: 变为:

git clone git@github.com:abcd/bashScripts.git git clone git@github.com:abcd/bashScripts.git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM