- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone [email protected]:owner/git.git
git config --global http.proxy "http://127.0.0.1:7890"
git config --global https.proxy "http://127.0.0.1:7890"git config --global http.proxy "socks5://127.0.0.1:7890"
git config --global https.proxy "socks5://127.0.0.1:7890"git config --global http.https://git.521000.best.proxy "socks5://127.0.0.1:7890"
git config --global https.https://git.521000.best.proxy "socks5://127.0.0.1:7890"git config --global --unset http.proxy
git config --global --unset https.proxy修改 ~/.ssh/config 文件(不存在则新建):
# 必须是 github.com
Host github.com
HostName github.com
User git
# 走 HTTP 代理
# ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=7890
# 走 socks5 代理(如 Shadowsocks)
# ProxyCommand nc -v -x 127.0.0.1:7890 %h %p
high sierra
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
latest
sudo vim /etc/services # (update the port config for ssh and save)
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
将配置改成了Clash的默认配置