[java] Change remote repository credentials (authentication) on Intellij IDEA 14

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:[email protected]/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.

This question is related to java git intellij-idea bitbucket

The answer is


In Intellinj IDEA 14, we can change the Git password by the following steps:

From the menu bar :

  1. Select File -> Settings -> Appearance & Behavior -> System Settings .

  2. Choose Passwords.

  3. Click the 'Master Password' under 'Disk storage protection'.

  4. In the Password field, enter your old password. Enter your new password in the subsequent fields.

  5. Now the master password will be changed.


This is how I solved it on Windows. I have git installed separately, and Idea just picks git's options automatically (Default Idea config, as I would get from clean installer).

Open the project in the command line. Make some changes there. And commit and push files via git which is installed on my machine. During push it will open a windows asking me to enter username and password. After that, when I make a commit-push from idea, it will simply work.


In my case, I got a CAPTCHA error. If you get that, first logout/login to Bitbucket, Github, .... on the website and enter the required captcha.

After that, try again from intellij and it should prompt for another password.


This worked for me on Intellij 12:

Open settings -> passwords, select "Do not remember passwords" and apply/ok.

Do your VCS fetch/update/push/whatever and it should ask you for a password.

Check remember password and OK, it should do the VCS thing correctly.

Go back to settings -> passwords and switch it back to "Remember on disk", then apply/ok.


For MACOS users

if you see credentials failed but you are sure that is is working previously then:

probably you made a software update to the system. System uses git bundled with xcode. its better to open Xcode and click install extra components on startup of xcode. it will say installing components. when you accept the license agreement if will start working again.

in short:

open Xcode, install additional ompoenents. accept user licence agreement


The following approach worked for me:

Create a new personal access token in GitHub and configure the connection in IntelliJ as per link: https://www.jetbrains.com/help/idea/github.html

Then, on IntelliJ, Settings-Version Control-Git screen, unclick the "Use credential helper" option.

IntelliJ Git Settings

Then do an restart with cache invalidation (File - Invalidate Caches / Restart - Invalidate and Restart)


There is an option to clear passwords

There is an option to clear passwords


After trying several answers, I was finally able to solve this issue (on window 10),

>git fetch
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://gitlab.abc.net/V4/VH.git/'

By updating the password stored in Git Credential Manger for Windows(GCM),

Control Panel->User Accounts -> Windows Credentials

For Mac users this could also be helpful:

Credentials are stored in Keychain Access.app. You can just change them there.


For the record, if you've already configured Git on your terminal, there's an option in preferences to use native Git rather than the built-in (bundled) one.

Screenshot


git credential-manager clear Target Url: https://bitbucketxxxxxxxxxxxxxxxx.git


None of above worked for me. Using Android Studio 3.5 Beta 4. I even selected "do not save, forget passwords after restart" in file>settings>appearance & behavior>System settings>password

So What I did.

VCS>git>remotes

  • remove the repo and add again.
  • will ask for credentials.
  • then try git fetch in terminal.
  • Will prompt for password.
  • Issue fixed. :D

You can change your password from settings screen (Ctrl + Alt + S by default) as attached screenshot. After clearing, on the firts remote operation (like pull/push, etc.) it'll ask you your credentials)

IMPORTANT: Take a copy of the file before this operation.

Settings Screen


  1. Go to [project]/.git directory.
  2. Open for edit 'config' file.
  3. In '[remote "origin"]' section find 'url' property and replace your old password with new one.
  4. Press Ctrl+T in Intellij IDEA to update project.

I needed to change my user name and password in Intellij Did it by

preferences -> version control -> GitHub

There you can change user name and password.


On Windows, just remove the remote repository (Git -> manage remotes ...) and add it again. you will be prompted to enter username and the new password.


Go to VCS>Git>Remotes then remove your remote url from the list and add again. Git will ask for a password after next git operation (push, pull, etc). NOTE: Don't forget to specify username in url or you will get auth error.


Doing the following steps helped in my case:

1) open Settings 2) go to Git and Uncheck "Use credential helper" checkbox 3) Do git pull 4) Enter password in the pop up dialog

Git operations will now work fine in IntelliJenter image description here!


IN Android Studio 2.3

  1. Open Setting (CTRL+ALT+S)
  2. Select Other Settings (at the end)
  3. select Bitbucket

Here you can change your new Password or User


For Mac User Please Go to As Below:

(First of all you must have installed bitbucket plugin)

Android Studio -> Preference -> Other Settings -> Bitbucket

Now change your password and click on Test for verify it. Will also able to add SSH Key for login.

Also its depend on which plugin you used. Some have direct like

Android Studio -> Preference -> Bitbucket linky


Linux users (tested on ubuntu 14.04)

by default (on linux and mac) pycharm uses the OS's password manager. To access the passwords on ubuntu open the program "Passwords and Keys".

icon for password manager

Once open filter on "idea" and edit the relevant passwords.

pict of password editor dialog box

No need to restart pycharm for me.
Using pycharm 17.2


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to git

Does the target directory for a git clone have to match the repo name? Git fatal: protocol 'https' is not supported Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) git clone: Authentication failed for <URL> destination path already exists and is not an empty directory SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 GitLab remote: HTTP Basic: Access denied and fatal Authentication How can I switch to another branch in git? VS 2017 Git Local Commit DB.lock error on every commit How to remove an unpushed outgoing commit in Visual Studio?

Examples related to intellij-idea

IntelliJ: Error:java: error: release version 5 not supported Has been compiled by a more recent version of the Java Runtime (class file version 57.0) Error: Java: invalid target release: 11 - IntelliJ IDEA IntelliJ can't recognize JavaFX 11 with OpenJDK 11 Error: JavaFX runtime components are missing, and are required to run this application with JDK 11 ERROR Source option 1.5 is no longer supported. Use 1.6 or later Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 How to configure "Shorten command line" method for whole project in IntelliJ intellij idea - Error: java: invalid source release 1.9 Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle

Examples related to bitbucket

How to markdown nested list items in Bitbucket? Your configuration specifies to merge with the <branch name> from the remote, but no such ref was fetched.? Bitbucket git credentials if signed up with Google What I can do to resolve "1 commit behind master"? Bitbucket fails to authenticate on git pull Change remote repository credentials (authentication) on Intellij IDEA 14 git: updates were rejected because the remote contains work that you do not have locally How do I push a local repo to Bitbucket using SourceTree without creating a repo on bitbucket first? Clone private git repo with dockerfile How to move git repository with all branches from bitbucket to github?