GitHub 拉取请求上的 HTTP 403

2024-01-09

我想提交我的第一个(有史以来)GitHub Pull 请求,但这样做遇到了一些困难。

根据本文 https://help.github.com/articles/creating-a-pull-request/我必须首先创建一个分支。所以我:

  • 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://[email protected] /cdn-cgi/l/email-protection':
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),或者它们是分开的?我的策略(推分支)错了吗?我很困惑。


如果您是该项目的贡献者,这些说明将会起作用,但您不是。所以你需要先分叉。读分叉一个回购协议 https://help.github.com/articles/fork-a-repo/。克隆你的叉子,在那里建立分支,推动并then提交拉取请求。

您的存储库与他们的存储库并没有真正拼写出来,但是如果您从文章开始并单击用于创建分支的链接,您最终会看到创建和删除分支your存储库 https://help.github.com/articles/creating-a-pull-request/。强调我的。

有关两种不同协作模型(Fork & Pull 与共享存储库)的更多信息,请参见使用拉取请求 https://help.github.com/articles/using-pull-requests/.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

GitHub 拉取请求上的 HTTP 403 的相关文章

  • 使用终端时 Git 推送在总计后卡住了?

    我尝试将一些文件推送到Github 总大小只有22 2M 我不知道为什么它在总行之后卡住了 我读过推送到 Github 时 Git 推送挂起 https stackoverflow com questions 16906161 git pu
  • Netbeans 和 Git,.obj 文件被忽略

    我正在开发一个涉及 obj 文件的小型 git 项目 当我查看 项目选项卡 时 我发现它们被忽略了 但如果我查看我的 gitignore 我无法理解为什么 DepthPeeling nbproject private DepthPeelin
  • git 认为文件已更改

    我在一台机器上对一个项目做了一些工作 然后推送到 github 在另一台机器上克隆并做了一些工作 然后推送 然后我回到第一台机器并做了一个pull 现在 第一台机器认为项目中最初的所有文件都已更改 我试过了 git checkout f a
  • Git 将一个分支合并到所有其他分支中

    我知道这个问题已经在这里被问过 https stackoverflow com questions 2329716 merging changes from master into all branches using git https
  • 将bitbucket发布到数字海洋

    我本质上是试图使用 bitbucket 来理解 git 的概念 我一直在通过修改本地帐户和 bitbucket 帐户之间的文件来练习版本控制 事实证明这很有帮助 现在我正在尝试弄清楚如何将文件从 bitbucket 或者我猜是 GitHub
  • 带有 git Remote 的 Gem 文件在 Heroku 推送上失败

    我的 gemfile 中有以下行 gem client side validations git gt email protected cdn cgi l email protection Dakuan client side valida
  • 自定义 SSH 端口上的 Git

    我的 VPS 提供商建议我将 SSH 端口保留为他们默认分配的自定义端口号 不是 22 问题是 虽然我知道我可以在创建远程配置时提供端口号 但在进行 Git 克隆时似乎无法提供相同的操作 我在用gitolite https wiki arc
  • Android 存储库初始化失败

    我想我非常仔细地遵循该网站的说明 http source android com source downloading html http source android com source downloading html 但是当我尝试这
  • git 排除与忽略

    I use Tower http www git tower com 用于在 Mac 中使用 Git Tower 中的设置具有创建 gitignore 的 忽略 部分 但它还有另一个名为 排除 的部分 似乎可以将排除与 git ls fil
  • git reflog 和 log 有什么区别?

    手册页说 log 显示提交日志 reflog 管理 reflog 信息 reflog 信息到底是什么 它有哪些日志没有的信息 日志看起来更详细 git log显示当前的 HEAD 及其祖先 也就是说 它打印提交 HEAD 指向的提交 然后打
  • Github - 上传文件

    我正在尝试将文件夹添加到 github 存储库 该文件在 github 上显示为空 并有一个绿色箭头 有谁知道如何解决这个问题 我将不胜感激你的帮助 谢谢 这看起来类似于 Git 如何跟踪未跟踪的内容 https stackoverflow
  • github actions 找不到 package.json

    我正在尝试设置一些基本的 GitHub 操作来在 PR 上撰写评论 Action 发布在 github 上 如下所示 action yml 文件 name name description description author me inp
  • 如何减少 Bitbucket 上的 git repo 大小?

    我的问题摘要 在我向两个现有文件添加了几百个字节后 我在 Bitbucket 上的一个私人存储库的大小突然增加了一倍多 该存储库现在超过 2GB 这导致 Bitbucket 将其置于只读模式 因为它处于只读模式 所以我无法推送会减少存储库大
  • 有没有一个简单的命令可以将分支转换为标签?

    我即将完成将 哑快照 转换为 git 的繁琐过程 这个过程进展得非常顺利 感谢这个重命名过程 https stackoverflow com questions 6628539 how to tell git that its the sa
  • Gerrit 和 Active Directory

    我正在尝试设置 Gerrit 以使用我们的公司 Active Directory 进行身份验证 我知道很多人都设法让它发挥作用 但它对我来说不起作用 如果我运行一个ldapsearch命令如下我得到了正确的结果 所以我知道我的搜索字符串是正
  • Phonegap使用命令行工具添加插件

    我是phonegap的新手 我按照phonegap官方网站中定义的步骤使用命令行工具创建项目 nodejs 我成功创建项目并添加平台 但是 当我尝试添加插件时出现以下错误 命令 cordova plugin add https git wi
  • Git - 远程:错误:无法运行钩子/后接收:没有这样的文件或目录

    我收到错误 remote error cannot run hooks post receive No such file or directory 当尝试推送到远程时 接收后文件存在于正确的位置 testnew git hooks 并包含
  • git 推送到 github 失败并显示“错误:pack-objects 因信号 967 死亡”

    我触发了这个命令 git push origin master 我得到这个结果 Counting objects 15626 done Delta compression using up to 4 threads error pack o
  • 我应该把 .gitignore 放在哪里才能影响所有项目?

    我应该在哪里放置一个 gitignore文件以便我的所有项目都使用这些设置 我尝试了各种文件夹 只有将其放入项目文件夹中才能使其正常工作 但是设置 当然 仅应用于该项目 而不是我的其他项目 git 包含一个 全局 配置选项 可以告诉它在启动
  • 无法使用 Git 部署从多项目解决方案部署正确的网站到 Azure

    我有一个解决方案 它有一个 mvc 网站 WebApplication1 该网站依赖于解决方案中的另一个项目 WebAppCore 源代码托管在 Visual Studio Online 上的 git 中 我配置了持续集成 一切都构建得很好

随机推荐