git 代理配置
git 代理配置
本文展示了 git 配置代理,方便拉取开源代码。
git 代理
# 查看 git 配置列表
git config --global --get -l
# 指定查询
git config --global --get http.proxy
git config --global --get https.proxy
git config --global --get http.https://github.com.proxy
# 配置取消
git config --global --unset http.proxy
git config --global --unset https.proxy
# 只代理 github 示例
git config --global http.https://github.com.proxy socks5://127.0.0.1:7897
# 取消
git config --global --unset http.https://github.com.proxy
# 镜像站 url 替换,发布站 https://ghproxy.link/
git config --global url."https://ghfast.top/https://github.com/".insteadOf https://github.com/
# 查询
git config --global --get-regexp ^url
# 取消
git config --global --unset url."https://ghfast.top/https://github.com/".insteadOf最后更新于