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`
相关推荐
IOT那些事儿10 小时前
Git报错:Could not get HEAD hash
git·hash·head
杜哥无敌12 小时前
Git Bash + acme.sh 实现 SSL 证书自动续签(完整指南)
git·bash·ssl
nunumaymax16 小时前
Git教程
git
阿萨德528号17 小时前
IDEA 项目 SVN 配置消失、版本控制变成 Git 且无 VCS 菜单的解决办法
git·svn·intellij-idea
R²AIN SUITE19 小时前
项目管理平台怎么和OA、钉钉、飞书、Git仓库打通?从消息通知到双向同步的5种实现路径
git·钉钉·飞书
Demons_kirit1 天前
CTFHub 信息泄露通关笔记:Git泄露 Log - 教程
笔记·git·网络安全
鬼手点金2 天前
构建有效 Agent 的核心原则
java·人工智能·git·学习·自动化
索西引擎2 天前
Git 大文件阻断推送的成因与历史重写修复
git
csdn2015_2 天前
git 合并分支
大数据·git·elasticsearch
9144062322 天前
mac Git 账户切换问题
git·macos