git pull 连接ssh失败
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-02 09:37:42
0
3
810

$ 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.

project中有代码更新,但是连接失败怎么解决,github中ssh码已经绑定。

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(3)
小葫芦

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.

大家讲道理

Github often suffers from convulsions in China, just try it more.
Or you can buy a VPN and connect it to operate.

我想大声告诉你

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...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template