热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

GitHub拉取请求上的HTTP403

如何解决《GitHub拉取请求上的HTTP403》经验,为你挑选了1个好方法。

我想提交我的第一个(永远)GitHub拉取请求,并且遇到了一些困难.

根据这篇文章,我必须首先创建一个分支.所以我:

git clone https://github.com/theuser/therepo.git

git branch mybranch

git checkout mybranch

做我的改变

git commit -a -m "Closes theuser/therepo/#100"

我在这里的想法(请纠正我,如果它是错的)是克隆回购,制作分支并提交对该分支的更改.

如果我正在阅读那篇文章(上面已经链接过),那么接下来我要做的就是推动分支,以便我可以继续步骤#2(在"分支"菜单中,选择包含你的提交的分支.).

所以我做了一个git push,我得到:

D:\workspace\therepo>git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

    git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

    git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Username for 'https://github.com': myuser
Password for 'https://myuser@github.com':
remote: Permission to theuser/therepo.git denied to myuser.
fatal: unable to access 'https://github.com/theuser/therepo.git/': The
    requested URL returned error: 403

我不知道这里发生了什么?是第一个警告/错误(抱怨push.default)导致第二个错误(HTTP 403),还是它们是分开的?我的策略(推动分支)是错误的吗?我很困惑.



1> Steven Fishe..:

如果您是该项目的贡献者,那些指示就有用,但您不是.所以你需要先分叉.读叉子回购.克隆你的fork,在那里创建分支,推送然后提交pull请求.

该资源库与他们的仓库是不是真的列明,但如果你看看你的文章开始,然后点击创建您在结束了分公司链接创建和删除内分支机构仓库.强调我的.

有关使用拉取请求中的两种不同协作模型(Fork&Pull与共享存储库)的更多信息.


推荐阅读
author-avatar
夡敧
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有