Shorn
Shorn

Reputation: 21436

IntelliJ IDEA: How do I verify and/or change my BitBucket git credentials?

As per this blog post, BitBucket is disabling account password usage for HTTPS access in March.

I've created one of these "app password" credentials - but how do I make IDEA to start using it?

I'm pretty sure I originally set my IDEA up to access via HTTPS and just put my BitBucket account username/password when prompted.

In my IDEA Git settings, Use credential helper is not enabled (so Windows credential manager is not relevant, pretty sure IDEA is saving into its Keepass file in the settings directory).

In other scenarios with changed account details, I've generally just tried to access the repo, waited for IDEA to fail and prompt for details, then entered the new credentials.

How do I tell IDEA to use the new password, given that the old password still works?

Things I don't want to do:

Upvotes: 2

Views: 8456

Answers (3)

Matt
Matt

Reputation: 85

Also remember that the App Passwords only work with with your Bitbucket Username and NOT with your email address.

So if you are trying to move from the old style of authentication, to the App Passwords, you also need to update your username if the user name is set to your email address

Upvotes: 1

sarab
sarab

Reputation: 1

I followed these step in Webstorm:

Git > Manage Remotes > select repo > OK -> webstorm asked me to re-authenticate and I specified the app password generated from Bitbucket. But terminal still showing this message:

remote: Yo are using an account password for Git over HTTPS. Beginning March 1, 2022, users are required to use app passwords for Git over HTTPS. To avoid any disruptions, change the password used in your Git client 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).

If I retry this procedure, webstorm doesn't show anymore the credential popup. I also tried "invalidate cache and restart" in webstorm, but nothing changes.

There's something else to do?

Thanks!

Upvotes: 0

Mathijs H
Mathijs H

Reputation: 41

Just in case someone still needs this info, here's how I did it. I'm not an expert - far from it, but I got it working...

How to check credentials in IntelliJ

  1. Menu Git > Manage Remotes... Git_ManageRemotes

  2. Check remote URL in "Define Remote" screen and press OK.
    When you press OK it will re-authenticate, in my case this gave me a window where I had to enter my app password.
    If you don't get the credential popup (that means your current credentials are still valid), maybe remove your current remote URL and re-add it, to force a username/password popup. Git_Remotes

How to configure your App Password in BitBucket

  1. Follow the instructions on the blog post you linked (copied below for archiving)

To create an app password:

  • From your profile and settings avatar, select Personal settings.
  • Select App passwords under Access management.
  • Select Create app password.
  • Give the app password a name related to the application that will use the password.
  • Select the specific access and permissions you want to assign to this application password.
  • Copy the generated password and either record or paste it into the application you want to give access. The password is only displayed this one time.
  1. Which permissions does your App Password need? In my case, all I needed was pull/push of the code, so the below permissions were enough (Pull Requests-write, the rest is automatically enabled) AppPassword_Permissions

Upvotes: 4

Related Questions