Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么可以';我不能从存储库中推送git吗?_Git_Github - Fatal编程技术网

为什么可以';我不能从存储库中推送git吗?

为什么可以';我不能从存储库中推送git吗?,git,github,Git,Github,我最近从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 reques

我最近从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推送

参考

更新

这似乎是一个身份验证问题。我注意到,当我在repos中执行
git config--list
时,没有填充任何用户信息

我尝试手动设置用户名和电子邮件,但即使这样也不起作用:

~/\u top/fav front>git config user.email'foo@foo.com"

~/\u top/fav front>git config user.name'foo'


user.name
user.email
与身份验证无关。
仅Git提交作者身份

请务必检查git config credential.helper的输出:例如,如果像中一样,检查github.com条目的输出:
osxkeychain


相应地编辑或删除条目。

user.name
user.email
与身份验证无关。
仅Git提交作者身份

请务必检查git config credential.helper的输出:例如,如果像中一样,检查github.com条目的输出:
osxkeychain


相应地编辑或删除条目。

您是如何验证
git clone
操作的?您通常是如何验证另一个repo中的
git push
的?检查两个repo中的
git remote-v
的输出。这将显示您使用的是ssh还是https。由于克隆是只读操作,因此不需要身份验证。它不应影响对其他回购协议或帐户的任何身份验证。抱歉。我更新了我的问题。Git似乎认为我是一个不同的用户。不知道如何排除故障,因为
git config--list
不返回任何内容。您如何验证
git clone
操作?您通常如何验证另一个repo中的
git push
?检查两个repo中的
git remote-v
的输出。这将显示您使用的是ssh还是https。由于克隆是只读操作,因此不需要身份验证。它不应影响对其他回购协议或帐户的任何身份验证。抱歉。我更新了我的问题。Git似乎认为我是一个不同的用户。不知道如何进行故障排除,因为
git config--list
不返回任何内容。