Bon*_*ina 11 github atlassian-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
Run Code Online (Sandbox Code Playgroud)
我尝试使用个人访问令牌并在源树上使用它,但仍然无法登录。
pro*_*lle 33
1 - 从 git dev 设置生成新令牌
2 - 在 SourceTree 中,您只需要在那里更改存储库设置:
3 - 使用新格式更改 URL/路径:
https://<USERNAME>:<TOKEN>@<GIT_URL>.git
Run Code Online (Sandbox Code Playgroud)
4 - 按确定,现在很好!
小智 10
逐步使用终端和 github
git remote remove origin
Run Code Online (Sandbox Code Playgroud)
使用个人访问令牌重新添加远程
请记住将<personal-access-token>和替换<my-repo>为您的凭据。
git remote add origin https://<personal-access-token>@github.com/<my-repo>.git>
Run Code Online (Sandbox Code Playgroud)
小智 7
如果在 Windows 上,打开凭据管理器并删除您的 github 凭据(如果有)。
如果在 macOS 上,打开“钥匙串访问”应用程序并删除您的 github 凭据(如果有)。
然后,按照此处的指南获取个人访问令牌https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-访问令牌
然后正常推送您的代码,并在要求输入您新生成的个人访问令牌时。
在源树中 > 打开 repo 设置 > 远程选项卡 > 将远程“URL/路径”编辑为
https://{personal-access-token>@github.com}/{<my-repo>}.git>
然后保存并尝试推送
我确实喜欢@heratyian 的回答并且工作正常。
| 归档时间: |
|
| 查看次数: |
8995 次 |
| 最近记录: |