BitBucket: You are using an account password for Git over HTTPS

Viewed 8365

Today I got the following message when I used Git + BitBucket on MacOS while pushing a new branch to BitBucket.

You are using an account password for Git over HTTPS.

Beginning March 1, 2022, users are required to use app passwords remote: for Git over HTTPS. To avoid any disruptions, change the password used in your Git client remote: to an app password. Note, these credentials may have been automatically stored in your Git client and/or a credential manager such as Git Credential Manager (GCM).'

4 Answers

In my case, I used BitBucket via HTTPS and not via SSH. Therefore I had to change it.

  1. Follow this guide to create and add a new SSH key.
  2. Follow this guide to switch from HTTPS to SSH.

Unrelated and optional:

While you are at this security related task, activate 2FA in your BitBucket security settings.

Windows 11, git at the command line

I have been using my bitbucket password for authentication.

I only know the basic git commands. I set up an App password. The documentation for this part is good. https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/

Checking your account details

git config user.name
git config user.email
git config user.password

git config --global user.name
git config --global user.email
git config --global user.password

to change values

e.g. 
git config user.name "New name"
gti config --global "New name"

I still had problems, although these values looked correct. I still got the password warning when I did a

git push origin main

As my local repo had no outstanding differences with my master Bitlocker repo I just cloned another copy of the repo from Bitlocker. This fixed the issue

Detailed steps

I moved my local repo to new folder x_reponame

created folder reponame

On the Bitbucket website I went to the repo and selected the Clone button in the top right. This gives you the correct command to clone the repo to my local repository.

from my local terminal git clone https://.....

after adding files and a commit

git push origin main

no longer gave me a password warning.

Related