BitBucket HTTPS 克隆 - 身份验证失败

Dan*_*l99 6 git https bitbucket

从 BitBucket 克隆。

我的 Git 设置正常,但在克隆时出现此错误。https。我拥有 BitBucket 网站的访问权限,可以查看所有项目,包括我想要克隆的项目。

我访问过该网站https不再支持。我应该如何克隆?

更新:我需要设置应用程序密码... brb

终端:

me@me:~$ git --version
git version 2.25.1
me@me:~$ git config --list
user.name=me
user.email=me@job.com

me@me:~$ git clone https://me@bitbucket.org/foo/bar.git
Cloning into 'bar'...
Password for 'https://me@bitbucket.org': 
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/foo/bar.git/'

me@me:~$ git clone git@bitbucket.org:foo/bar.git
Cloning into 'bar'...
The authenticity of host 'bitbucket.org (104.192.141.1)' can't be established.
RSA key fingerprint is SHA256:BLAH.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'bitbucket.org,104.192.141.1' (RSA) to the list of known hosts.
git@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

解决方案

您需要设置一个应用程序密码

在 Bitbucket 上,请按照以下6 个步骤操作。

然后,在终端中:

git clone https://USERNAME:APP_PASSWORD@bitbucket.org/username/reposlug.git
Run Code Online (Sandbox Code Playgroud)

来源

Reg*_*Reg 13

要解决这个问题请看这个

链接描述内容概述:

正如您在错误消息中指出的那样,从 2022 年 3 月 1 日起,Bitbucket Cloud 用户在通过 HTTPS 对 Git 使用基本身份验证时将无法再使用其帐户密码。

这可以通过从帐户密码切换到应用程序密码来解决。首先,登录 BitBucket 并按照指定的说明在 BitBucket 中创建应用程序密码,完成后设置原始 URL 以使用应用程序密码。