ssh 通过 443 访问 github - github access from behind a firewall
Posted on 2012-03-31 17:22 hallo 阅读(4588) 评论(0) 编辑 收藏 举报在 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: