Unable to Connect to GitHub.com For Cloning

后端 未结 5 916
甜味超标
甜味超标 2020-11-28 18:10

I am trying to clone the angular-phonecat git repository, but I am getting the following message when I enter the command in my Git Bash:

$ git clone git://g         


        
相关标签:
5条回答
  • 2020-11-28 18:33

    You can make git replace the protocol for you

    git config --global url."https://".insteadOf git://
    

    See more at SO Bower install using only https?

    0 讨论(0)
  • 2020-11-28 18:37

    Open port 9418 on your firewall - it's a custom port that Git uses to communicate on and it's often not open on a corporate or private firewall.

    0 讨论(0)
  • 2020-11-28 18:41

    You are probably behind a firewall. Try cloning via https – that has a higher chance of not being blocked:

    git clone https://github.com/angular/angular-phonecat.git
    
    0 讨论(0)
  • 2020-11-28 18:47

    I had the same error because I was using proxy. As the answer is given but in case you are using proxy then please set your proxy first using these commands:

    git config --global http.proxy http://proxy_username:proxy_password@proxy_ip:port
    git config --global https.proxy https://proxy_username:proxy_password@proxy_ip:port
    

    0 讨论(0)
  • 2020-11-28 18:53

    You can try to clone using the HTTPS protocol. Terminal command:

    git clone https://github.com/RestKit/RestKit.git
    
    0 讨论(0)
提交回复
热议问题