无法推送:远程:您的凭据缺少一个或多个所需的权限范围

Mik*_*e C 0 git bitbucket visual-studio-code

从我的主计算机(使用 VS Code),无法在该帐户上推送到 bitbucket 上的远程存储库,但我可以克隆和拉取。我可以正常推送到我的 Github 帐户。我已经使用命令行命令和 GUI 尝试过此操作。

我有写访问权限:

[![我的访问级别的屏幕截图][1]][1]

PS C:\xampp\htdocs\REDACTED-tests> git remote -v
origin  https://MichaelWCho@bitbucket.org/REDACTED.git (fetch)       
origin  https://MichaelWCho@bitbucket.org/REDACTED.git (push)
Run Code Online (Sandbox Code Playgroud)
> git push -u origin test_branch
remote: Your credentials lack one or more required privilege scopes.
fatal: unable to access 'https://bitbucket.org/REDACTED': The requested URL returned error: 403
Run Code Online (Sandbox Code Playgroud)

我还在 VirtualBox 中工作,其中安装了 VS Code。从这里,我可以正常推送并执行所有操作。该问题仅限于我的主计算机。[1]: https: //i.stack.imgur.com/aCr6B.jpg

Mik*_*e C 5

我在这里找到了一个解决方案:https://community.atlassian.com/t5/Bitbucket-questions/Relationship-of-the-git-credentials-and-the-App-key/qaq-p/1136104

该问题似乎是“对 Windows 凭据存储的干扰”。

  • 我删除了与 bitbucket 相关的凭据(位于控制面板 > 用户帐户 > 凭据管理器 > 通用凭据)。
  • 然后,当我尝试推送时,会弹出一个 Atlassian 窗口并提示我输入密码。我输入了那个。
  • 然后,它就正确地推动了。

除了推送之外,我还删除了一个本地分支并克隆了一个存储库,所有工作都没有任何问题。