zoukankan      html  css  js  c++  java
  • git 配置本地代理

    git 配置本地代理

    1. 设置scoks代理

    全局配置代理

     git config  --global http.proxy socks5://127.0.0.1:10808
     git config  --global https.proxy socks5://127.0.0.1:10808
    

    当前项目文件夹内

     git config  --local http.proxy socks5://127.0.0.1:10808
     git config  --local https.proxy socks5://127.0.0.1:10808
    

    2.设置http代理

     git config  --global http.proxy http://127.0.0.1:1081
     git config  --global https.proxy https://127.0.0.1:1081
    

    当前项目文件夹内

     git config  --local http.proxy http://127.0.0.1:1081
     git config  --local https.proxy https://127.0.0.1:1081
    

    取消代理设置

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

    修改 config 文件(推荐)

    打开目录下 .git 文件夹

    找到 config文件

    在后面添加两行

    [http]
    	proxy = socks5://127.0.0.1:10808
    [https]
    	proxy = socks5://127.0.0.1:10808
    

    同理,清除代理就是把这两行删掉

    全局配置的设置 在 用户文件夹下(C:Usersyourname) .gitconfig 文件中,

  • 相关阅读:
    研究下
    linux 下wireshark安装与使用
    Spring优秀工具类Resource
    sunOS常用命令
    常用网站
    linux sar指令
    spring+quartz详解
    linux setenv 用法
    转hashmap非线程安全的解决办法
    gdb 调试core
  • 原文地址:https://www.cnblogs.com/WNpursue/p/14987768.html
Copyright © 2011-2022 走看看