Git The requested URL returned error: 403,Token authentication requirements for Git operations

一、问题描述

在 Sourcetree 上使用 git push 代码的时候报错:The requested URL returned error: 403,表示没有权限来 push 相关代码

二、问题解决

如果你之前在 GitHub 配置过 Personal access tokens,也就是 个人访问令牌,那么出现该问题的原因,可能是 token 过期失效,或者是没有配置 token 导致身份验证失败。

事实上,这个问题困扰我许久,网上资料很少,仅有的一些资料也没有解决我的问题。我是在邮箱里看到一封名为 [GitHub] Your personal access token has expired 的邮件,才突然想到有可能是 token 的问题。

为什么会涉及到 token,简单讲一下背景,主要是因为 GitHub 于 2020 年 12 月 15 日在官方博客发布的文章: Token authentication requirements for Git operations

In July 2020, we announced our intent to require the use of token-based authentication (for example, a personal access, OAuth, or GitHub App installation token) for all authenticated Git operations. Begi

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值