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`



Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐