万隆的笔记 万隆的笔记
博文索引
笔试面试
  • 在线学站

    • 菜鸟教程 (opens new window)
    • 入门教程 (opens new window)
    • Coursera (opens new window)
  • 在线文档

    • w3school (opens new window)
    • Bootstrap (opens new window)
    • Vue (opens new window)
    • 阿里开发者藏经阁 (opens new window)
  • 在线工具

    • tool 工具集 (opens new window)
    • bejson 工具集 (opens new window)
    • 文档转换 (opens new window)
  • 更多在线资源
  • Changlog
  • Aboutme
GitHub (opens new window)
博文索引
笔试面试
  • 在线学站

    • 菜鸟教程 (opens new window)
    • 入门教程 (opens new window)
    • Coursera (opens new window)
  • 在线文档

    • w3school (opens new window)
    • Bootstrap (opens new window)
    • Vue (opens new window)
    • 阿里开发者藏经阁 (opens new window)
  • 在线工具

    • tool 工具集 (opens new window)
    • bejson 工具集 (opens new window)
    • 文档转换 (opens new window)
  • 更多在线资源
  • Changlog
  • Aboutme
GitHub (opens new window)
  • Git

    • 代码版本控制
    • Git简介和安装
    • Git配置SSH
    • TortoiseGit配置SSH
    • Git WorkFlow
    • Git 命令
    • Git配置代理
      • 设置全局代理
      • 取消代理
      • 只对github.com设置代理
      • 取消github.com代理
      • 修改配置文件办法
    • Git多账号配置
  • Issue

  • Git
  • Git
2021-07-18
目录

Git配置代理

# Git配置代理

# 设置全局代理

端口号,根据自己的实际情况去设置

git config --global http.proxy "127.0.0.1:1080"
git config --global https.proxy "127.0.0.1:1080"

# 取消代理

git config --global --unset http.proxy
git config --global --unset https.proxy

# 只对github.com设置代理

git config --global http.https://github.com.proxy "127.0.0.1:1080"

# 取消github.com代理

git config --global --unset http.https://github.com.proxy

# 修改配置文件办法

找到git的配置文件.gitconfig。这个文件一般在用户目录下。

[http "https://github.com"]
  proxy = "127.0.0.1:1080"

# 为所有的配置socks5代理
[http]
  proxy = "127.0.0.1:1080"
上次更新: 5/30/2023, 10:03:37 PM
Git多账号配置

Git多账号配置→

最近更新
01
2025
01-15
02
Elasticsearch面试题
07-17
03
Elasticsearch进阶
07-16
更多文章>
Theme by Vdoing
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式