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