git:// protocol blocked by company, how can I get around that?

前端 未结 7 881
醉话见心
醉话见心 2020-11-28 00:26

Attempting something like git clone git://github.com/ry/node.git will not work, it results in:

Initialized empty Git repository in /home/robert/         


        
7条回答
  •  执念已碎
    2020-11-28 00:36

    Another option which not involving touching git config is to change the ssh settings to use port 443 instead of the regular 22 port.

    Reference: Using SSH over the HTTPS port

    From that article:

    edit the file at ~/.ssh/config, and add this section:
    
    Host github.com
       Hostname ssh.github.com   
       Port 443
    

    Afterward, I was able to successfully git push to Github. At home you can change back ssh config to the way it was if you want.

提交回复
热议问题