fatal: ServicePointManager 不支持具有 socks5 方案的代理。

报错

报错信息

写在前面

最近尝试自己之前的解决方法发现不行了,然后在这里找到了答案

  • github -> 右上角自己头像 -> settings -> (拉到最下面)developer settings -> Personal access tokens -> Tokens(classic)
    在这里插入图片描述
    在这里插入图片描述
  • 复制生成的token (当作密码)
    • Username: your_github_name
    • Password:this_copyied_token在这里插入图片描述

以下是http和socks5的github代理更改方式,针对某些情况可用

解决前

git config --global --list 查看git的设置
原来的配置

解决后

// 代理更改为http (7890是我的代理软件clash的port默认的,有些博客使用的是1080,依个人情况而定)
git config --global http.proxy 'http://127.0.0.1:7890'
git config --global https.proxy 'http://127.0.0.1:7890'
git config --global http.https://github.com.proxy 'http://127.0.0.1:7890'
// (记录一下!)代理更改为socks5
git config --global http.proxy 'socks5://127.0.0.1:7890'
git config --global https.proxy 'socks5://127.0.0.1:7890'
git config --global http.https://github.com.proxy 'socks5://127.0.0.1:7890'

在这里插入图片描述
有博客说socks5上传速度快,笔者未考究。2023.7月我还在使用socks5的方式,还是可以用的,不知道为什么8月份上传代码突然给我报错了。总而言之,通过修改socks5->http解决了我的报错

附一个修改github用户名相关问题解决链接

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值