search

Home  >  Q&A  >  body text

Once I configured ssh after modifying git at home, and then I couldn’t use git again after I returned to the company.

操作步骤是这样的 
1, git add . 
2. git commit -m 'modify' 
3. git fetch origin 


这一步报这个错 
$ git fetch origin 
ssh: connect to host github.com port 22: Connection timed out 
fatal: Could not read from remote repository. 
Please make sure you have the correct access rights and the repository exists. 

求大家帮忙
为情所困为情所困2723 days ago629

reply all(3)I'll reply

  • 某草草

    某草草2017-06-05 11:10:49

    Add the local ssh public key to the git library.

    reply
    0
  • 大家讲道理

    大家讲道理2017-06-05 11:10:49

    One-step method, regenerate the public key and then replace the public key

    reply
    0
  • 阿神

    阿神2017-06-05 11:10:49

    Two possibilities:
    1. The company network has disabled SSH port 22
    2. The SSH key of the company machine has not been added

    Solution:
    1. Switch to https protocol or switch to port 443
    2. Add public key

    reply
    0
  • Cancelreply