0
我有两个GitHub帐户:RVdutchman和RoyVoetman。我想一个文件夹推到仓库Rv.FileMaker(从RoyVoetman),所以我做了GitHub仍然在我的旧帐户中推送
git add .
git commit -m"Project Commit"
git push https://github.com/RoyVoetman/Rv.FileMaker.git master
但后来我得到
remote: Permission to RoyVoetman/Rv.FileMaker.git denied to RVdutchman.
fatal: unable to access 'https://github.com/RoyVoetman/Rv.FileMaker.git/':
The requested URL returned error: 403
它看起来像我仍然在我的旧帐户RVdutchman登录?可是为什么,我改变了它:
git config --global user.email "[email protected]"
git config --global user.name "RoyVoetman"
UPDATE
git config --system --unset credential.helper
此命令为我工作source
设置'user.name' git设置不等同于使用git server/remote repository进行验证。否则,任何人都可以这样做,并推送到您的存储库。 – Leon