$ git pull project develop
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.
There is a code update in the project, but the connection fails. How to solve the problem? The ssh code in github has been bound.
高洛峰2017-05-02 09:39:42
First check if there is a network problem. If the network is not good, connecting to Github in China will often time out.
If it is not a network problem, if it is installedGithub desktop
可以先打开下,然后在git pull
.
大家讲道理2017-05-02 09:39:42
Github often suffers from convulsions in China, just try it more.
Or you can buy a VPN and connect it to operate.
我想大声告诉你2017-05-02 09:39:42
The solution given by the official help is to use ssh port 443:
1. Test the usability first
ssh -T -p 443 git@ssh.github.com
The following proof is available
Hi username! You’ve successfully authenticated, but GitHub does not
provide shell access.
2. Then edit the ~/.ssh/config file. If there is no config file, just vim ~/.ssh/config and add the following content
Host github.com
Hostname ssh.github.com
Port 443
Test again
ssh -T git@github.com
The following tips are available
Hi username! You’ve successfully authenticated, but GitHub does not provide shell access.
3. Refer to github official help:
https://help.github.com/artic...