本來好好地.不知道為什麼不能push了.估計是被牆,於是搜搜解決辦法.改換埠
參考 https://mozillazg.com/2015/08/use-443-port-fix-github-connection-timeout.html
參開: https://help.github.com/articles/using-ssh-over-the-https-port/
修改 ~/.ssh/config 中 github.com 的配置, Hostname
改為 ssh.github.com
, Port
改為 443
:
如果沒有config檔案就手動建立一個
1 Host github.com 2 Hostname ssh.github.com 3 Port 443
測試
ssh -T git@github.com The authenticity of host '[ssh.github.com]:443 ([xxx.xxx.xxx.xxx]:443)' can't be established. RSA key fingerprint is SHA256:xxxxxxxx.... Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[ssh.github.com]:443,[xxx.xxx.xxx.xxx]:443' (RSA) to the list of known hosts. Hi unixc3t! You've successfully authenticated, but GitHub does not provide shell access.