How to access bitbucket repository in Sublime Merge using App Password

1.4k views Asked by At

Some time ago I was working on a Bitbucket repository using Sublime Merge. After performing a PUSH for the first time I had to enter my password for https://<my_bitbucket_username>@bitbucket.org. But after March 1, 2022 Bitbucket Cloud stopped supporting account passwords for Git authentication. So when I tried to perform a PUSH recently I got the following error message:

fatal: Invalid credentials remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication. [...] fatal: Authentication failed for 'https://bitbucket.org/<my_bitbucket_username>/<my_repository_name>.git/'

What should I do to regain the ability of performing PUSH operations in Sublime Merge.

1

There are 1 answers

1
promeek On
  1. In Web Browser login to your bitbucket account - after that you should land at the following address: https://bitbucket.org/<user_name>/

  2. Now open the following address: https://bitbucket.org/account/settings/app-passwords/

  3. Click 'Create app password' button.

  4. Type some label for the new App Password and select the following Permissions: Repositories -> Read, Write, Admin

  5. Click Create

  6. Copy the created App Password and paste it somewhere not to lose it.

Now go to your repository in Sublime Merge.

  1. In Sublime Merge at the left side there are three tabs/columns: Locations, Commits, Files.
  2. Open the tab/column named 'Locations'.
  3. Click 'REMOTES (..)' to unfold REMOTES branch.
  4. You should see the 'origin' sub-branch now.
  5. Right-click the 'origin' branch and from the popup menu select Update Remote URL.

You will see your previous Remote URL.

  1. Now modify your Remote URL as follows:

https://<your_user_name>:<app_password>@bitbucket.org/<your_user_name>/<repository_name>.git

  1. Click ENTER

Now you can click PUSH to perform the PUSH operation.