更新本地github帐户信息

更新本地github帐户信息,git,github,git-config,Git,Github,Git Config,无法从本地终端提交到我的新github帐户存储库 remote: Permission to <new-account-name>/22c.git denied to <old-account-name>. 揭示了以下几点: credential.helper=osxkeychain core.editor=/usr/bin/vim core.autocrlf=input user.name=<new-account-name> user.email=<

无法从本地终端提交到我的新github帐户存储库

remote: Permission to <new-account-name>/22c.git denied to <old-account-name>.
揭示了以下几点:

credential.helper=osxkeychain
core.editor=/usr/bin/vim
core.autocrlf=input
user.name=<new-account-name>
user.email=<new-email>
push.default=simple
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=https://github.com/<new-account-name>/22c.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
credential.helper=osxkeychain
core.editor=/usr/bin/vim
core.autocrlf=输入
用户名=
user.email=
push.default=simple
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=https://github.com//22c.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

感谢您的帮助,请告诉我是否还有其他方法可以帮助解决此问题。

请注意,
user.name=
与GitHub的身份验证无关,因为
:这只是与提交相关联的作者身份

您的凭据可能缓存在osxkeychain中:您需要在那里更新它们。
见“”。在命令行中:

git credential-osxkeychain erase
host=github.com
protocol=https
[Press Return]
如果成功,则不会打印任何内容。
要测试它是否有效,请尝试从GitHub克隆存储库。如果系统提示您输入用户名/密码,则钥匙链条目已被删除


有关详细信息,请参阅“”。

问题出在我的osxkeychain中。单击此处可获得详细记录的解决方案

git credential-osxkeychain erase
host=github.com
protocol=https
[Press Return]