git 身份验证的应用程序密码(bitbucket 和 sourcetree)

发布于 2025-01-13 17:15:45 字数 862 浏览 1 评论 0原文

当我尝试推送时,sourcetree 显示以下错误。

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags ruling master:master
remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/xxxxxxx/ruling.git/'

所以我去了 https://bitbucket.org/account/settings/app-passwords/< /a> 创建应用程序密码,添加密码标签并选择权限。

但推送仍然不起作用,并且出现相同的错误消息。

之后,我不知道该怎么办。 请告诉我下一步应该做什么。

When I tried to push,sourcetree shows below error.

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags ruling master:master
remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/xxxxxxx/ruling.git/'

So I went to https://bitbucket.org/account/settings/app-passwords/
Created app password, added Password Lable, and Select Permissions.

But still, push does not work and the same error message appears.

After that, I don't know what to do.
Please advise me what should I do next.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

回忆躺在深渊里 2025-01-20 17:15:45

在 Windows 上,导航到

C:\Users\\AppData\Local\Atlassian\Sourcetree 并删除 passwd 文件。

  • 请注意,删除此文件后,Sourcetree for Windows 最终可能会再次提示您输入密码。

以下链接中提到了另外两个潜在的解决方案,但对我来说,上述解决方案有效:

https://community.atlassian.com/t5/Sourcetree-articles/Bug-Fix-Sourcetree-for-Windows-authentication-error-when/ba-p/1965968

On Windows, Navigate to

C:\Users\<UserName>\AppData\Local\Atlassian\Sourcetree and remove the passwd file.

  • Please be warned, that after removing this file, Sourcetree for Windows may eventually prompt you for your password(s) again.

There are two more potential solutions mentioned on the following link, but for me the above worked:

https://community.atlassian.com/t5/Sourcetree-articles/Bug-Fix-Sourcetree-for-Windows-authentication-error-when/ba-p/1965968

三寸金莲 2025-01-20 17:15:45

除了其他答案之外,这里还有一个对我有用的提示:

当我切换到 bitbucket 应用程序密码时,我在 Sourcetree 中遇到了同样的问题。我也重新安装了 Sourcetree,但没有成功。

我再次尝试重新安装,但这次在完成身份验证过程和安装后,我退出了该浏览器窗口(显示身份验证成功)。然后我尝试在工具>中使用基本身份验证选项>身份验证并且成功了。

我注意到的区别是:当我从浏览器注销时,Sourcetree 升级了应用程序密码,而当我登录时却没有。

In addition to the other answers here is a tip that worked for me:

I had the same issue in Sourcetree when I switched to bitbucket app password. I reinstalled the Sourcetree as well but had no luck.

I tried reinstalling again but this time I logged out of that browser window (which shows authentication successful) after completing the authentication process and installation. Then I tried using basic authentication in tools > options > authentication and it worked.

The difference I did notice was: Sourcetree promoted for the app password when I was logged out from the browser which it didn't when I was logged in.

眼前雾蒙蒙 2025-01-20 17:15:45

我有一个适合我的不同解决方案,但在寻找这个问题时我还没有看到。

在 SourceTree 中,选择“工具/选项/身份验证”,然后选择不起作用的帐户。然后选择“编辑”,它应该打开一个“编辑托管帐户”窗口。

我使用 OAuth 作为凭据。我单击“刷新 OAuth 令牌”按钮,它打开了一个指向本地主机 URL 的空白浏览器窗口。在“编辑主机帐户”窗口的底部,有一个绿色复选框,上面写着“身份验证正常”。然后我的 Push 又起作用了。

编辑主机帐户窗口

I have a different solution that worked for me, which I have not seen yet in searching for this problem.

In SourceTree, Tools/Options/Authentication and select the account that's not working. Then select "Edit" and it should open a window "Edit Hosting Account."

I am using OAuth as the credentials. I clicked the button "Refresh OAuth Token" and it opened a blank browser window pointing to a localhost URL. At the bottom of the Edit Hosting Account window, there's a green checkbox that says "Authentication OK". Then my Push worked again.

Edit Hosting Account window

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文