3

Cloning from BitBucket.

I've Git setup ok, but got this error when cloning via. https. I've access rights on BitBucket website, can see all projects including the one I want to clone.

I visited the website, https is no longer supported. How should I clone?

Update: I need to setup an App Password... brb

Terminal:

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.

Solution

You need to setup an App Password.

On Bitbucket, follow these 6 steps.

Then, in Terminal:

git clone https://USERNAME:APP_PASSWORD@bitbucket.org/username/reposlug.git

Source

DanielBell99
  • 896
  • 5
  • 25
  • 57
  • https://stackoverflow.com/search?q=%5Bbitbucket%5D+recently+stopped+supporting+account+passwords+for+Git+authentication – phd May 05 '22 at 15:53

1 Answers1

5

To solve this please see this

Overview of what the link describes:

As you pointed out from the error message, from March 1, 2022, Bitbucket Cloud users will no longer be able to use their account passwords when using Basic authentication for Git over HTTPS.

This can be resolved by switching to App Password from Account Password. First, log in to BitBucket and follow the instructions specified to create an App Password in BitBucket once it is done set the origin URL to use the App Password.

Reg
  • 10,717
  • 6
  • 37
  • 54