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
  • 148,457
  • 42
  • 363
  • 369
Ratha
  • 8,920
  • 16
  • 71
  • 141

2 Answers2

2

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,752
  • 1
  • 24
  • 31
1

I tried following command but not working:

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

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,129,465
  • 480
  • 4,036
  • 4,755
  • 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