解决拉取github仓库报错“gnutls

编程入门 行业动态 更新时间:2024-10-28 07:25:30

解决拉取github仓库<a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错“gnutls"/>

解决拉取github仓库报错“gnutls

本文首发于:/

gnutls_handshake() failed: The TLS connection was non-properly terminated.

最近为新配置的虚机拉取库,但是从 GitHub 拉取库总是出问题,查阅网上文献将问题锁定在代理,但是找了一圈还是没有找到答案。

经过仔细排查,发现还是由于代理设置有错,为 http 错误配置了 https 的代理,导致出错。

如果没有配置代理,可使用以下命令 取消代理

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

如果需要使用 代理http 协议通过以下命令配置,使用 7890 端口为例:

git config --global http. http://127.0.0.1:7890
git config --global https. https://127.0.0.1:7890

socket 协议通过以下命令配置,使用 7890 端口为例:

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

也可以这样子 仅代理 GitHub

git config --global http. socks5://127.0.0.1:1080
#取消代理
git config --global --unset http.

拓展阅读

  • git 设置和取消代理 - Frytea Wiki

更多推荐

解决拉取github仓库报错“gnutls

本文发布于:2024-02-12 01:15:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1684874.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   仓库   github   gnutls

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!