When Git prompts you for your password, enter your personal access token (PAT) instead. Password-based authentication for Git is deprecated, and using a PAT is more secure. For more information, see "Creating a personal access token."
通过 Keychain Access 更新凭据
- 单击菜单栏右侧的 Spotlight 图标(放大镜)。 键入
Keychain access
,然后按 Enter 键启动应用程序。 - 在 Keychain Access 中,搜索 [hostname]。
- 查找
[hostname]
的“互联网密码”条目。 - 相应地编辑或删除该条目。
通过命令行删除凭据
Through the command line, you can use the credential helper directly to erase the keychain entry.
$ git credential-osxkeychain erase
host=hostname
protocol=https
> [Press Return]
如果成功,则不会打印出任何内容。 To test that it works, try and clone a repository from your GitHub Enterprise Server instance. If you are prompted for a password, the keychain entry was deleted.