Change remote repository credentials (authentication) on Intellij IDEA 14

JavaGitIntellij IdeaBitbucket

Java Problem Overview


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.

Java Solutions


Solution 1 - Java

The easiest of all the above ways is to:

  1. Go to Settings>>Appearance & Behavior>>System Settings>>Passwords
  2. Change the setting to not store passwords at all
  3. Invalidate and restart IntelliJ
  4. Go to Settings>>Version Control>>Git>>SSH executable: Build-in
  5. Do a fetch/pull operation
  6. Enter the password when prompted
  7. Again go to Settings>>Appearance & Behavior>>System Settings>>Passwords
  8. 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

Solution 2 - Java

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

Solution 3 - Java

There is an option to clear passwords

There is an option to clear passwords

Solution 4 - Java

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!

Solution 5 - Java

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

Solution 6 - Java

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.

Solution 7 - Java

  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.

Solution 8 - Java

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.

Solution 9 - Java

For Mac users this could also be helpful:

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

Solution 10 - Java

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

Solution 11 - Java

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.

Solution 12 - Java

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)

Solution 13 - Java

The steps resolved issue for me in Windows

  1. Go to Control Panel

  2. Search for "Credentials"

  3. Select Windows Credentials

  4. Select github credentials from the list

  5. Select edit and update your password then restart Intellij

Solution 14 - Java

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 components. accept user licence agreement.

on Xcode updates this step should be repeated.

Solution 15 - Java

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

Solution 16 - Java

In my case I have cloned a project from GitLab to develop it. I did couple of commits too. But suddenly I had to change the access token to download another project. After that I couldn't do anything related to git in CLION. So what moleksyuk has said is true.

>close IDE > go to your local repo > go to .git directory (show if it is hidden already) > open the config file with a editor > In there,

[remote "origin"] url = https://{yourname:access_token}@gitlab.yourorganization.com/1stdir/2nddir/your_project.git

fetch = +refs/heads/:refs/remotes/origin/

You have to replace existing name and access token with the new ones.

looks like this(https://Janith:[email protected]/1stdir/2nddir/your_project.git)

> save > open IDE and do the git action.

Solution 17 - Java

On Windows 10 go to:

Control Panel\User Accounts\Credential Manager

Under Generic Credentials find your repository URL, use Edit to change your password.

After these steps, a pull should work correctly.

enter image description here

Solution 18 - Java

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.

Solution 19 - Java

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

Solution 20 - Java

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.

Solution 21 - Java

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.

Solution 22 - Java

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

Solution 23 - Java

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

Solution 24 - Java

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.

Solution 25 - Java

Steps to change git remote username/password

  • Go to Control Panel
  • Search for Credential Manager
  • Click on Windows Credentials
  • In Generic Credential section ,there would be git url, update username and password

Solution 26 - Java

Recently Bitbucket has stopped supporting user/pass git https integration. So I could no longer pull/fetch.

Turns out that it wasn't necessary to change the GIT Username or "authentication scheme"(from UserCredentials to Token).

All I had to is:

  • Please grab an app password (or generate on via Bitbucket Web UI), and use it to authenticate.
  • Use your Bitbucket username as a login, and app password as a password.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003444939/comments/360000461679

Solution 27 - Java

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMomoView Question on Stackoverflow
Solution 1 - JavaMozenRathView Answer on Stackoverflow
Solution 2 - JavaDushmanthaView Answer on Stackoverflow
Solution 3 - JavaborovskyView Answer on Stackoverflow
Solution 4 - JavaRameshView Answer on Stackoverflow
Solution 5 - JavaoneklcView Answer on Stackoverflow
Solution 6 - Javasy677View Answer on Stackoverflow
Solution 7 - JavamoleksyukView Answer on Stackoverflow
Solution 8 - JavaC. NateshView Answer on Stackoverflow
Solution 9 - Javaw01ffView Answer on Stackoverflow
Solution 10 - JavagaldinView Answer on Stackoverflow
Solution 11 - JavaN. ChebotarevView Answer on Stackoverflow
Solution 12 - JavaAbhijithView Answer on Stackoverflow
Solution 13 - Javajava.nazifView Answer on Stackoverflow
Solution 14 - JavaAlp AltunelView Answer on Stackoverflow
Solution 15 - JavaTanerView Answer on Stackoverflow
Solution 16 - JavaJanith PriyankaraView Answer on Stackoverflow
Solution 17 - JavaognjenklView Answer on Stackoverflow
Solution 18 - JavaIdan MagledView Answer on Stackoverflow
Solution 19 - JavaM Singh KarnawatView Answer on Stackoverflow
Solution 20 - JavacodeplebView Answer on Stackoverflow
Solution 21 - JavaYan KhonskiView Answer on Stackoverflow
Solution 22 - JavaAkash RaghavView Answer on Stackoverflow
Solution 23 - JavaHongSec ParkView Answer on Stackoverflow
Solution 24 - JavamjassaniView Answer on Stackoverflow
Solution 25 - JavaRitu GuptaView Answer on Stackoverflow
Solution 26 - JavarazvangView Answer on Stackoverflow
Solution 27 - JavaPankaj ChauhanView Answer on Stackoverflow