问题描述
今天git push 的时候遇到了这个报错:
fatal: 发送请求时出错。
fatal: 基础连接已经关闭: 接收时发生错误。
fatal: 无法从传输连接中读取数据: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。。
fatal: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/***'
报错原因
git在本地的权限账号到期了,需要重新设置token
解决办法
1.登录GitHub,在个人设置页面,找到Setting
2.选择开发者设置Developer setting
3.选择个人访问令牌Personal access tokens,然后选中生成令牌Generate new token
4.设置token的有效期,访问权限等,选择要授予此令牌token的范围或权限。
5.生成令牌Generate token,复制保存这个token,页面刷新就找不到了!!!
具体步骤参考:https://blog.csdn.net/weixin_41010198/article/details/119698015
最后重新 git push
在登录的弹出框选择 token,并输入刚才生成的token,然后就可以了!
主题开源不易,支持一下作者吧!

使用支付宝打赏

使用微信打赏
评论 | 0 条评论
登录之后才可留言,前往登录
[…] 然后再执行你的命令 git pull/push… 如果需要验证账号,请参考这篇https://course.51qux.com/2876.html […]