git配置proxy

复制代码
git config  --list
git config --global --list

配置proxy

两种proxy方式

http/https形式:git clone https://github.com/xxxxx

走ssh 形式:git clone git@github.com:xxxxx

走http/https
复制代码
git config --global http.proxy "http://127.0.0.1:7890"
git config --global https.proxy "http://127.0.0.1:7890"
取消proxy
复制代码
`git config --global --unset http.proxy
git config --global --unset https.proxy`
走ssh

修改 .ssh/config 文件(不存在则新建,Windows 一般在 C:\Users\YourName.ssh)文件夹下面新建一个文件 config,注意没有任何后缀名,就叫 config):

复制代码
`# 必须是 github.com
Host github.com
   HostName github.com
   User git
   # 走 HTTP 代理
   ProxyCommand connect - PROXY:127.0.0.1:7890 %h %p`
相关推荐
至善迎风29 分钟前
版本管理系统与平台(权威资料核对、深入解析、行业选型与国产平台补充)
git·gitee·gitlab·github·svm
上单带刀不带妹5 小时前
Git rm 命令与系统 rm 命令的区别详解
git
我的收藏手册8 小时前
性能监控shell脚本编写
前端·git·github
Yvonne爱编码10 小时前
简述ajax、node.js、webpack、git
前端·git·ajax·webpack·node.js·visual studio
2501_920047031 天前
git在Linux中的使用
linux·git·elasticsearch
小马哥编程1 天前
DNS解析中的服务器协作机制
服务器·git·github
白帽小野1 天前
SVN和Git两种版本管理系统对比
git·svn·版本控制系统
rivercoder1 天前
Gitea:轻量级的自托管Git服务
git·gitlab·gitea
呜喵王阿尔萨斯2 天前
git命令解析
c++·git
Doris_LMS3 天前
Git的强软硬回退(三)
运维·服务器·数据库·git·idea