直接编辑~/.ssh/config,没有就创建一个

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ProxyCommand C:\Program Files\Git\mingw64\bin\connect.exe -S 127.0.0.1:10808 -a none %h %p

Host github.com
User git
Port 22
Hostname github.com
IdentityFile "C:\Users\xiaobai\.ssh\id_rsa"
TCPKeepAlive yes

Host ssh.github.com
User git
Port 443
Hostname ssh.github.com
# 注意修改路径为你的路径
IdentityFile "C:\Users\xiaobai\.ssh\id_rsa"
TCPKeepAlive yes