如何更改 PhpStorm 中的 Git 凭据?

How to change the Git credentials in PhpStorm?

我在一个项目上使用了另一个用户名和密码,现在我需要为同一个项目使用不同的用户名登录。我试图为工作项目提取代码,但它不起作用,因为我的旧用户名已被删除。我尝试更改凭据,但在 PhpStorm 中看不到任何选项。

我试过以下命令但没有用:

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

有什么帮助吗? (我正在研究 MAC)

I tried following command but not working:

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

IntelliJ product are using Git from command-line 起,首先检查您的凭据助手是否为 osxkeychain:

git config credential.helper

并尝试按照我在“

中提到的步骤进行操作

Ratha confirms :

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

我无法真正回答 MAC,但在 Windows 更高版本的 Jetbrains 产品中将其凭据存储在密码库中。

对于 PhpStorm 2019,它使用 KeePass 数据库,数据库的位置可以在“设置”>“外观和行为”>“系统设置”>“密码”中找到。

也有可能 Git 配置不同可以查看 git config credential.helper 以确定您当前的配置,在 Mac 上它可能配置了 osxkeychain。