I recently changed my Bitbucket password for security reasons. However, IntelliJ didn’t update my repository to the new credentials, so it stops me from pulling/pushing anything to my repository. I am not using any plugins for this, just the integrated VCS operations inside the IDE.
Every time I pull/push, this pops out:
fatal: Authentication failed for ‘https://momothereal:xxxxxxxxxxxx@bitbucket.org/team/repo.git/
Where xxxxxxxxxxxx is my old password. I think changing this remote address with the correct password would fix it, though I cannot find where to do so.
Advertisement
Answer
The easiest of all the above ways is to:
- Go to Settings>>Appearance & Behavior>>System Settings>>Passwords
- Change the setting to not store passwords at all
- Invalidate and restart IntelliJ
- Go to Settings>>Version Control>>Git>>SSH executable: Build-in
- Do a fetch/pull operation
- Enter the password when prompted
- Again go to Settings>>Appearance & Behavior>>System Settings>>Passwords
- This time select store passwords on disk(protected with master password)
Voila!
Note that this will not work if your password is in your URL itself. If that is the case then you need to follow the steps given by @moleksyuk here
You also choose to use the credentials helper option in IntelliJ to achieve similar functionality as suggested by Ramesh here