当前位置:首页 > 编程笔记 > 正文
已解决

Git配置代理:fatal: unable to access*** github Failure when receiving data from

来自网友在路上 169869提问 提问时间:2023-11-19 04:46:50阅读次数: 69

最佳答案 问答题库698位专家为你答疑解惑

~吐槽一下

github自从被微软收购以后,大多数情况没点科技上网都进不去了,还是怀念以前随时访问的时光。

我一直都是开着系统代理的,但是今天拉一个项目发现拉不下来了,报错:

fatal: unable to access 'https://github.com/ ***** .git/': Failure when receiving data from the peer

在这里插入图片描述

这只能说明我自己的Git里面代理没生效咯~
那就自己手动设置吧!

  1. 首先看一下自己的配置
git config --global --list
  1. 设置代理

# 格式就是: git config --global http.proxy IP:端口
# 例如我的
git config --global http.proxy 127.0.0.1:7890# 注意:如果是需要身份验证的,就用这种格式:
git config --global http.proxy 用户名:密码@IP:端口# 如果需要设置https,那么就需要把 http.proxy 改成 https.proxy
git config --global https.proxy 127.0.0.1:7890# 之后再用命令查看一下修改后的配置git config --global --list# 设置好之后就可以愉快地 git clone 了
  1. 取消设置代理
git config --global --unset http.proxy# 或者git config --global --unset https.proxy# 再查看修改后的配置
git config --global --list

OJBK完事!

查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"Git配置代理:fatal: unable to access*** github Failure when receiving data from":http://eshow365.cn/6-38920-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!