【教程】Git代理配置 http & https

双份浓缩馥芮白 / 2023-05-19 / 原文

✨Git代理配置

# http https
git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890

# socks5
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 --unset http.proxy
git config --global --unset https.proxy

ssh代理配置暂未解决

查询相关教程对~/.ssh/config进行配置

会导致使用git clone时ssh认证出错


曲线救国方式:

配置git https代理后clone repo

修改.git中的config

把remote的url更改为ssh url


⭐转载请注明出处

本文作者:双份浓缩馥芮白

版权所有,如需转载请注明出处。