在远程存储库中推送更改时出错

时间:2020-06-25 07:55:34

标签: git github

我正在尝试将一些更改从分支的存储库推送到远程存储库。为此,我正在使用

$ git push --set-upstream origin my-first-branch

这给了我

remote: Permission to jquery/jquery.git denied to theo82.
fatal: unable to access 'https://github.com/jquery/jquery.git/': The requested URL returned error: 403

我知道遥控器是

$ git remote -v
$ origin  https://github.com/jquery/jquery.git (fetch)
$ origin  https://github.com/jquery/jquery.git (push)

如何解决该错误?

谢谢, 西奥。

1 个答案:

答案 0 :(得分:2)

remote: Permission to jquery/jquery.git denied to theo82.
fatal: unable to access 'https://github.com/jquery/jquery.git/': The requested URL returned error: 403

出现上述错误的原因是您无权推送到该存储库

通常,开源项目有一个贡献准则,即不允许贡献者将其直接推送到存储库。指南是创建一个fork,对其做出贡献(提交更改并推送到fork存储库),然后创建一个从fork到原始存储库的请求请求

因此,基本上,您需要将更改推送到分支,然后从分支的分支创建请求请求到GitHub上原始仓库的主分支 >。

您可以准备有关 jQuery 回购here的贡献准则的更多信息。

相关问题