2017-04-15 74 views
2

無法向我的本地終端提交我的新github帳戶存儲庫。更新本地github帳戶信息

remote: Permission to <new-account-name>/22c.git denied to <old-account-name>. 

我已經更新了我的世界 '混帳配置' settings`

git config --list 

揭示了以下內容:

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/* 

感謝你的幫助,讓我知道,如果有別的這將有助於解決問題

回答

2

請注意,user.name=<new-account-name>與認證無關作爲<new-account-name>作爲GitHub:它僅僅是關於提交相關的作者。

您的憑據可能被緩存在您的git credential helper osxkeychain中:您需要在那裏更新它們。
請參閱「Updating credentials from the OSX Keychain」。在命令行:

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

如果它是成功,什麼也不會打印出來。
要測試它的工作原理,請嘗試從GitHub克隆存儲庫。如果系統提示您輸入用戶名/密碼,則鑰匙串條目已被刪除。

查看更多的「How do you reset the stored credentials in git credential-osxkeychain?」。

0

問題出在我的osxkeychain上。請點擊here以獲得有據可查的解決方案。