My GIT environment is set up correctly, but I get an error when cloning via HTTPS
. I do have the correct access rights on BitBucket, and when I log in, I can see all the projects, including the one I want to clone.
I visited the website, and HTTPS
is no longer supported.
How can I clone the project?
Update: I need to set up an App Password.
Terminal:
me@me:~$ git --version
git version 2.25.1
me@me:~$ git config --list
user.name=me
[email protected]
me@me:~$ git clone https://[email protected]/foo/bar.git
Cloning into 'bar'...
Password for 'https://[email protected]':
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 [email protected]: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.
[email protected]: 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 set up an App Password.
On Bitbucket, follow these 6 steps.
Then, in Terminal:
git clone https://USERNAME:[email protected]/username/reposlug.git