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

前端 未结 7 816
醉话见心
醉话见心 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:54

    I was also having the same issue for a while. Then I tried changing the git config using the suggested command:

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

    which unfortunately did not do the trick for me. I was still having the same problem!

    What actually solved my problem at last is, I have reset the remote url of my repository again using the following command:

    git remote set-url origin https://github.com/<my_user_name>/<my_repo_name>.git
    

    which was previously like this:

    git remote set-url origin git@github.com:<my_user_name>/<my_repo_name>.git
    

    After setting the remote url using https:// instead of git@git.com the problem was resolved for me.

    0 讨论(0)
提交回复
热议问题