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