ssh: connect to host github.com port 22: Connection timed out

前端 未结 17 2421
陌清茗
陌清茗 2020-12-04 05:25

I am under a proxy and I am pushing in to git successfully for quite a while.
Now I am not able to push into git all of a sudden.
I have set the RSA key and the prox

17条回答
  •  不思量自难忘°
    2020-12-04 05:32

    The reason could be the firewall modification as you are under a network.(In which case they may deliberately block some ports)
    To double check if this is the reason ... do

    ssh -T git@github.com
    

    this should timeout. If that's the case use http protocol instead of ssh this way
    just change your url in the config file to http.
    Here is how :-

    git config --local -e
    

    change entry of

     url = git@github.com:username/repo.git
    

    to

    url = https://github.com/username/repo.git
    

提交回复
热议问题