首页 > 解决方案 > git 密码身份验证的源代码树修复作为断电的一部分被暂时禁用。请改用个人访问令牌

问题描述

仅供参考,这是专门针对sourcetree的,我在拉入sourcetree时遇到了这个错误,昨天它工作得很好,但突然出现了这个错误。

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch origin
remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
fatal: unable to access 'https://github.com/London-Foster/frontend.git/': The requested URL returned error: 403

我尝试拥有一个个人访问令牌并在源树上使用它,但仍然无法登录。

标签: githubatlassian-sourcetree

解决方案


1 - 从 git dev 设置生成新令牌

2 - 在 SourceTree 中,您只需在此处更改存储库设置:

在此处输入图像描述

在此处输入图像描述

3 - 使用新格式更改 URL/路径:

https://<USERNAME>:<TOKEN>@<GIT_URL>.git

在此处输入图像描述

4 - 按 OK,现在很好!


推荐阅读