当前位置:   article > 正文

Github 程序员加速 http和ssh代理设置_github ssh 代理

github ssh 代理

简单直接的输出干货,复制->粘贴->完活.

Http代理设置

全局

git config --global http.proxy socks5://127.0.0.1:10808
  • 1

指定github

git config --global http.https://github.com.proxy socks5://127.0.0.1:10808
  • 1

SSH代理设置

Linux

配置文件在home目录下的 .ssh/config 其中 nc 程序位于 /usr/bin/nc

$ cat ~/.ssh/config

Host github.com
Hostname ssh.github.com
User git
Port 443
ProxyCommand nc -v -x 127.0.0.1:10808 %h %p
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
Windows

使用Git Bash

$ cat ~/.ssh/config

Host github.com
Hostname ssh.github.com
User git
Port 443
ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 127.0.0.1:10808 %h %p
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/716685
推荐阅读
相关标签
  

闽ICP备14008679号