git config --global https.proxy http://127.0.0.1:1080
   
  git config --global https.proxy https://127.0.0.1:1080
   
  git config --global --unset http.proxy
   
  git config --global --unset https.proxy
   
   
  npm config delete proxy
 

git config --local https.proxy https://127.0.0.1:1080 我这样配置有什么问题么?为什么还是没走ss代理呢?

 

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 https 而没设置git config --global http的时候,clone一个google的git仓库依然不行,后来加上了http的设置才可以,我也是ss代理 端口都和你们一样,有人知道这是为什么吗? 我的clone仓库url是https的啊,但还是需要把http和https代理都挂上才可以吗?

 

@zhuyingda 显然是 https 不起作用,只有 http 起作用

My ubuntu server was blocked to git clone some github repo,

Do as @itolfh said,

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

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

my git works!
Thanks @itolfh

按照

#只对github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080 #取消代理
git config --global --unset http.https://github.com.proxy)

设置
速度感人!!!

我如此设置之后clone gist同样没有被代理

git设置

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

本地ss5端口

$ nmap localhost
Starting Nmap 7.01 ( https://nmap.org ) at 2017-03-28 23:05 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000035s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
1080/tcp open socks Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds

ss查看开放端口信息

$ ss -tln | grep 1080
LISTEN 0 128 127.0.0.1:1080 *:*

我确信ss5已经打开并且能用,毕竟浏览器能用。
但是在

$ git clone https://gist.github.com/666dd7b27e9116faece6.git
正克隆到 '666dd7b27e9116faece6'...
fatal: unable to access 'https://gist.github.com/666dd7b27e9116faece6.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

出现如上错误,我不知道是不是我的git设置问题呢。在这里提问抱歉了。我也google搜索了很久,只有在您这里提到了设置ss5。
谢谢

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

注意: 代理地址不要加引号!
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
大部分网站下载没问题, 但是遇到 gclient 下载会出错, 去掉引号号后成功

问下 我想代理 git://git.com 这种开头应该怎么加 ,试了下 不行

@zhangle1 使用 git@xxoo.com 这种方式,是用的 SSH 协议。需要在 ~/.ssh/config 目录下配置

Host xxoo.com(改成你的站点)
ProxyCommand connect -H 127.0.0.1:1080 %h %p

补充两点:
1, https.proxy设置是无用的, 只需要设置http.proxy
2, socks5h://更好, 远端DNS

对于使用git@协议的,可以配置socks5代理
在~/.ssh/config 文件后面添加几行,没有可以新建一个

Host github.com
ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p

多次 set/unset 之后, 通过 git config --global -e 可以看到有好多空的 [http], [https]

怎么能够不产生多余的内容?

https.proxy 根本就不存在这个设置好吗
只有http.proxy是正确的 他负责所有的http[s]代理设置

git 是没有 https 这个 config section 的
如果想要使用SOCKS5代理的话只需要
git config --global http.proxy "socks5h://your_addr:your_port" 即可

 git config --global --unset http.https://github.com.proxy) 多了一个 )

为什么我还是不行啊 socks代理127.0.0.1:1080

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

https加上也不行
都是
: gnutls_handshake() failed: The TLS connection was non-properly terminated.

$ sudo curl -sSL  https://get.docker.com/ | sh
curl: (35) gnutls_handshake() failed: The TLS connection was non-properly terminated.

新装的系统,装docker的时候出现这个报错

解决方案是:

瞅下本机dns配置,/etc/resolv.conf

sudo vim /etc/resolv.conf

添加阿里的dns

nameserver  223.5.5.5
nameserver  223.6.6.6

就可以了

 

最新文章

  1. .net 分布式架构之分布式缓存中间件
  2. this的指向(慢慢添加)
  3. Atitit 常用比较复杂的图像滤镜 attilax大总结
  4. 如何保存CONSOLE LOG
  5. html页面元素加载顺序
  6. mysql主从复制详解
  7. webSocket vnc rfb
  8. IE6兼容性问题及IE6常见bug详细汇总---转载
  9. [LeetCode119]Pascal's Triangle II
  10. 网站开发进阶(四十二)巧用clear:both
  11. python avro 数据格式使用demo
  12. Python项目--Scrapy框架(一)
  13. 第37章:MongoDB-集群--Replica Sets(副本集)---单机的搭建
  14. js基础梳理-究竟什么是执行上下文栈(执行栈),执行上下文(可执行代码)?
  15. TypeScript 之 声明文件的使用
  16. (转)Python新手写出漂亮的爬虫代码2——从json获取信息
  17. Scala--数组相关操作
  18. 使用Chrome保存网页为mht文件
  19. Unity扩展编辑器三
  20. 一道hive面试题:explode map字段

热门文章

  1. python: 使用matplotlib的pyplot绘制图表
  2. HDU 1996 汉诺塔VI (排列组合)
  3. clipse maven 项目 出现红色叹号 解决方法
  4. poj1312dfs基础
  5. 基于FBX SDK的FBX模型解析与加载 -(四)
  6. python matplotlib相关 dateutil
  7. CentOS7下如何正确安装并启动Docker(图文详解)
  8. python之商品操作小程序
  9. flask跨域问题
  10. bzoj 5018 [Snoi2017]英雄联盟