繁体   English   中英

为什么我不能从存储库中进行git push?

[英]Why can't I do a git push from my repository?

我最近从GitHub上的其他用户帐户克隆了一个git存储库,如下所示:

git clone https://github.com/some_user/fav-front.git

并得到:

remote: Permission to user_current/fav-front.git denied to user_prev.
fatal: unable to access 'https://github.com/user_current/fav-front.git/': The requested URL returned error: 403

但是,我仍然可以使用当前用户执行git push。

参考

https://help.github.com/en/articles/cloning-a-repository

https://help.github.com/en/articles/create-a-repo

更新资料

这似乎是身份验证问题。 我在存储库中执行git config --list时,发现没有用户信息被填充。

我尝试手动设置用户名和电子邮件,但即使这样也无法正常工作:

〜/ _top / fav-front> git config user.email'foo@foo.com'

〜/ _top / fav-front> git config user.name'foo'

user.nameuser.email与身份验证无关。
只有Git提交作者身份。

请检查git config credential.helper输出:例如,如果是osxkeychain ,如在Git缓存GitHub密码中所示 ,然后按此处的github.com条目中的方式检查钥匙串

https://help.github.com/assets/images/help/setup/keychain-entry.png

相应地编辑或删除条目。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM