如何让 Git 使用 HTTP 代理服务器
来源:互联网 发布:qq飞车布鲁斯沃特数据 编辑:程序博客网 时间:2024/06/07 03:45
如果是 git clone http:// 或 git clone https:// 的话直接把代理服务器加到环境变量就可以了:
$ export http_proxy="http://username:password@squid.vpsee.com:3128/" $ export https_proxy="http://username:password@squid.vpsee.com:3128/"如果是 git clone git:// 的话麻烦一些(可能有的 git 源不提供 http/https 的方式),需要先安装 socat,然后创建一个叫做 gitproxy 的脚本并填上合适的服务器地址、端口号等,最后配置 git 使用 gitproxy 脚本:
$ sudo apt-get install socat $ sudo vi /usr/bin/gitproxy #!/bin/bash PROXY=squid.vpsee.com PROXYPORT=3128 PROXYAUTH=username:password exec socat STDIO PROXY:$PROXY:$1:$2,proxyport=$PROXYPORT,proxyauth=$PROXYAUTH $ sudo chmod +x /usr/bin/gitproxy $ git config --global core.gitproxy gitproxy 0 0
- 如何让 Git 使用 HTTP 代理服务器
- 如何让 Git 使用 HTTP 代理服务器
- 如何让 Git 使用 HTTP 代理服务器
- git HTTP代理服务器配置
- Git使用代理服务器
- 如何使用代理服务器
- 如何使用代理服务器
- 如何使用代理服务器上网
- 如何使用代理服务器上网
- 使用nginx搭建http代理服务器
- 使用Nginx搭建Http代理服务器
- 使用nginx搭建http代理服务器
- 使用nginx搭建http代理服务器
- 使用nginx搭建http代理服务器
- 如何让git使用vim而不是vi
- 使用命令行如何让.git文件夹显示
- 如何简单使用代理服务器上网
- 使用Https隧道穿越Http代理服务器
- Android数据库SQLite
- 硬编码学习(五)
- C语言中的动态内存--堆和栈
- 第11周 项目2-2 职员有薪水了(2)
- 欢迎使用CSDN-markdown编辑器
- 如何让 Git 使用 HTTP 代理服务器
- leetcode 第145题 Binary Tree Postorder Traversal
- OC语言三大特性
- 计算灰度共生矩阵
- unity3d 手机中Input类中touch详解_教程
- 五元素把握页面文字舒适感
- G1 垃圾收集器入门
- 第11周 项目3 点类派生直线类
- struts2的session的用法