【问题标题】:App passwords for git authentication(bitbucket and sourcetree)用于 git 身份验证的应用程序密码(bitbucket 和 sourcetree)
【发布时间】:2022-07-20 13:20:31
【问题描述】:

当我尝试推送时,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/ 创建应用密码,添加密码标签,并选择权限。

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

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

【问题讨论】:

标签: git bitbucket atlassian-sourcetree


【解决方案1】:

在 Windows 上,导航到

C:\Users\<UserName>\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

【讨论】:

【解决方案2】:

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

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

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

我注意到的不同之处在于:当我从浏览器中注销时,Sourcetree 会提升应用程序密码,而我登录时却没有。

【讨论】:

    猜你喜欢
    • 2018-01-19
    • 2017-11-30
    • 2017-08-03
    • 1970-01-01
    • 1970-01-01
    • 2017-08-16
    • 2022-07-12
    • 1970-01-01
    • 2014-03-26
    相关资源
    最近更新 更多