2

I have used another username and password to work on a project and now I need to log in with different username for same project. I tried to pull codes for the worked projects but it is not working, since my older username has been removed. I try to change credentials but I don't see any option in PhpStorm.

I tried following command but not working:

git credential-osxkeychain erase host=github.com protocol=https

Any help? (I'm working on MAC)

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Ratha
  • 9,434
  • 17
  • 85
  • 163

3 Answers3

3

I can't really answer for a MAC, but on Windows later version of Jetbrains' products store its credentials in a password vault.

In the case of PhpStorm 2019, it uses the KeePass database and the location of the DB can be found in Settings > Appearance & Behavior > System Settings > Passwords.

It's also possible that Git is configured differently can look at git config credential.helper to determine what your configuration currently is, being on a Mac it's probably configured with osxkeychain.

codemonkee
  • 2,881
  • 1
  • 25
  • 32
1

I tried following command but not working:

git credential-osxkeychain erase host=github.com protocol=https

That should actually be:

printf "host=github.com\nprotocol=https" | git credential-osxkeychain erase

Since IntelliJ product are using Git from command-line, check first if your credential helper is osxkeychain:

git config credential.helper

And try to follow the steps I mention in "Why is Git using a wrong account (with osxkeychain)?"

Ratha confirms in the comments:

I went through the keychain app and deleted.. now it is working.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Yes, my credential helper is osxkeychain. That is why, I tried above command.When I run that command it didn't print anything and didn't end up with new line(it is running so long) ANy it didnt workout. Thanks for that post, I went through the keychain app and deleted.. now it is working – Ratha Apr 09 '19 at 04:55
  • @Ratha Great! I have included your comment in the answer for more visibility. – VonC Apr 09 '19 at 04:57
0

You can go to Control Panel->"Credentials"->Windows Credentials->github/gitlab credentials then update your password.

Qiimiia
  • 510
  • 6
  • 16