How to access bitbucket using app password

You can perform this request as follows:

curl -u "walery2iq:<appPassword>" "https://api.bitbucket.org/2.0/repositories/[yourRepo]"

Important thing here - use your username, not e-mail address. Important because for login on bitbucket itself you are using e-mail and not username :D

You can find your username here:

Settings -> Account settings -> Username

See picture.

Use this username - not your mail address


Since the question was "how do I access the repository" - maybe this is useful for somebody:
You can also use a Bitbucket "App Password" to use Git over HTTPS.

git clone https://USERNAME:[email protected]/OWNER/REPO.git

(Or, if you want to avoid storing the password in plaintext:
Omit :APP_PASSWORD in the URL above, and just provide the App Password when prompted by Git.)

This may be useful for CI (although Git over SSH might be better).


If you have a 2-step verification I was able to clone but not to make a push. This worked for me using git instead of curl:

git push https://<username>:<GENERATED-APP-PASS>@bitbucket.org/<username>/<repo>.git

Generate an app password at https://bitbucket.org/account/admin/app-passwords


You need to create your "app password" on bitbucket console. Under your Avatar ->Personal Settings ->Access Management ->App Password. Create app password and note it down.

Once done, open your git bash and set the remote origin using -

git remote set-url origin https://<Your_Account_Name>:<App_Password>@bitbucket.org/<Your_Account_Name>/<Repo_Name>.git

Tags:

Bitbucket