ssh 通過 443 訪問 github - github access from behind a firewall


在 SSH 默認端口 22 被屏蔽時,

hallo@hallo /usr/bin
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out

可以使用 443 端口訪問 github 。

 


 

這里在 cygwin 環境中做演示:

1. 在 /home/hallo/.ssh 目錄中添加配置文件 config

Host github.com
User xxxx@gmail.com
Port 443
Hostname ssh.github.com
identityfile ~/.ssh/id_rsa

2. clone 倉庫到本地。

kysnail@kysnail /cygdrive/f/Books/gitrepo
$ git clone git@github.com:xxx/xxx.git
Cloning into 'PHP'...
remote: Counting objects: 23, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 23 (delta 0), reused 23 (delta 0)
Receiving objects: 100% (23/23), 3.26 KiB, done.

 

Ref:

Git over port 443


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM