无法使用应用程序密码通过 Visual Studio 代码登录到 Bitbucket Repo

Not Able to Login to Bitbucket Repo Via Visual Studio Code Using App Password

我最近为 bitbucket 设置了一个应用程序密码,因为从 3 月 1 日起,当我通过 Mac 上的 Mac 代码连接到存储库时,他们现在需要这个密码。

但是,我现在很难连接上。在我之前已经克隆的 Visual Studio 代码中加载了一个项目,我在终端中输入了以下内容:

git remote set-url origin https://<firstname.lastname>:<app-password>@bitbucket.org/<organization>

然后当我尝试 git push origin feature-branch

我在终端中收到以下错误:

remote: Invalid credentials
fatal: Authentication failed for 'https://bitbucket.org/<organization>/'

我在这里错过了什么?

顺便说一下,我从这里得到了以上指示:

对了,我也试过了:

git remote set-url origin https://<firstname.lastname>:<app-password>@bitbucket.org/<organization>.git

此外,理想情况下,我想设置全局凭据,因为我将始终针对同一个组织帐户,但其中的存储库不同。任何想法如何做到这一点?

最后,在尝试了许多不同的命令行条目并阅读了不是很清楚的文档之后,我终于能够使用 Curl 来实现它:

curl -u "<user>:<appPassword>" "https://api.bitbucket.org/<rootOrg>"

也就是说,举个例子:

curl -u "bill.smith:h8sdgj0dkdjjf0s00f" "https://api.bitbucket.org/superorg"