在 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

相关文章:

  • 2021-08-10
  • 2022-01-20
  • 2021-06-16
  • 2021-12-22
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-10
  • 2021-09-28
  • 2022-01-09
  • 2021-09-05
  • 2021-05-26
相关资源
相似解决方案