Skip to content

Instantly share code, notes, and snippets.

@alexniver
Last active December 21, 2022 07:34
Show Gist options
  • Save alexniver/150ff2c4c22cc8db5a3e51ca9bb4f21c to your computer and use it in GitHub Desktop.
Save alexniver/150ff2c4c22cc8db5a3e51ca9bb4f21c to your computer and use it in GitHub Desktop.
git 科学上网

install connect

yay -S connect

vi ~/.ssh/config

Host github.com
  User git
  Port 22
  Hostname github.com
  IdentityFile "C:\Users\XXXXX\.ssh\id_rsa"
  TCPKeepAlive yes
  IdentitiesOnly yes
  ProxyCommand connect -H 127.0.0.1:7891 %h %p


Host ssh.github.com
  User git
  Port 443
  Hostname ssh.github.com
  IdentityFile "C:\Users\XXXXX\.ssh\id_rsa"
  TCPKeepAlive yes
  IdentitiesOnly yes
  ProxyCommand connect -H 127.0.0.1:7891 %h %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment