zoukankan      html  css  js  c++  java
  • git 通过代理克隆GitHub仓库

    windows环境使用局部配置

    Git常用的有两种协议

    不同的协议他的代理配置各不相同。core.gitproxy 用于 git:// 协议,http.proxy 用于 http:// 协议。
    常见的git clone 协议如下:
    不走代理:
      #使用http://协议   
      git clone https://github.com/EasyChris/baidu.git   
      #使用git://协议
      git clone git@github.com:EasyChris/baidu.git
    走代理方式:
      #使用http://协议
      git clone -c http.proxy="http://127.0.0.1:1080" https://github.com/madrobby/zepto.git
      #通常小飞机的代理在本机地址是127.0.0.1 代理端口是1080
      git config http.proxy 'socks5://127.0.0.1:1080'
      #使用git://协议
      git config core.gitProxy 'socks5://127.0.0.1:1080'

    windows环境下增加全局配置

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

    查看你的全局配置

    git config --global -l

     
  • 相关阅读:
    安装lamp服务器
    Linux ssh登录命令
    一些替代Xshell的软件推荐
    字符串输入的几种方式
    Java数据库操作的一些注意
    模拟堆
    web安全基础第一天
    情报搜集
    kali中的postgres怎么连接
    LeetCode:Validate Binary Search Tree
  • 原文地址:https://www.cnblogs.com/pbblogs/p/11946622.html
Copyright © 2011-2022 走看看