git pull 連接ssh失敗
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-02 09:37:42
0
3
736

$ 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碼已經綁定。

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

全部回覆(3)
小葫芦

先確認是不是網路的問題,網路不好的話國內連Github會經常超時。

不是網路問題的話,如果安裝了Github desktop可以先打开下,然后在git pull

大家讲道理

github國內時常抽風,多試試就可以了。
或你可以購買VPN,掛VPN進行操作。

我想大声告诉你

官方幫助給的解決方式是使用 ssh 443連接埠:

1,先測可用性

ssh -T -p 443 git@ssh.github.com

提示如下證明可用

Hi username! You’ve successfully authenticated, but GitHub does not
provide shell access.

2,然後編輯~/.ssh/config 文件,如果沒有config文件的話就直接vim ~/.ssh/config加入以下內容

Host github.com
Hostname ssh.github.com
Port 443

再次測試

ssh -T git@github.com

提示如下即可用

Hi username! You’ve successfully authenticated, but GitHub does not provide shell access.

3,參考github官方幫助:
https://help.github.com/artic...

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!