3

I am trying to clone the repository. I go into the repository on Bitbucket, click "Clone", set it to HTTPS, then copy the text it gives me. I go into VS Code, click the branch on the left-hand side, click clone. I insert the command, it asks for my password and I insert my Bitbucket password. After the password I am given an error.

The error reads as follows:

"Git: remote: You'll need to authenticate with a valid app password. You can create an app password from your account at https://bitbucket.org/account/admin/app-passwords"

I'm using a Mac from 2011 so some things are not updated but it worked less than a month ago.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Luke Lynch
  • 39
  • 1
  • 2

1 Answers1

5

Try first and create an HTTP access token or (for the Cloud) "App passwords"

Then provide that token/app password as a password when cloning (in command line or through VSCode).
That should authenticate you properly and allow you to clone the repository.

This worked for me where I have cloned the repo locally before creating the app passwords.

Given you have the app password created in your bitbucket repo

Then update your local git repo as below

git remote set-url origin https://USERNAME:APP_PASSWORD@bitbucket.org/OWNER/REPO.g

The last command is for testing only, you should not include password in your URL, but use a credential storage to cache it.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Your answer links to documentation for Bitbucket Server, but this question (and your example) are about Bitbucket Cloud. Unfortunately the answer you've provided won't work - this should help: https://stackoverflow.com/questions/70393902/how-do-i-obtain-an-http-access-token-from-a-bitbucket-repository-on-bitbucket-cl/70415364#70415364 – daveruinseverything Dec 19 '21 at 21:13
  • @daveruinseverything Thank you. I have edited the answer to include the link to App Password (Cloud) you mention in your comment. – VonC Dec 19 '21 at 21:20