修改别人的叉子的拉动要求 [英] Amend pull request from another-one's fork

查看:66
本文介绍了修改别人的叉子的拉动要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另一个用户通过以下方式在我的存储库(例如myself/foorbar)上提交了拉取请求:

Another user submitted a pull request on my repository (e.g. myself/foorbar), by:

  1. 创建叉子(例如otheruser/foobar).
  2. 在她/他的叉子上进入一个分支(例如otheruser/foobar:patch).
  3. 在Github上打开拉取请求,启用允许维护者进行编辑".
  1. Creating a fork (e.g. otheruser/foobar).
  2. Committing to a branch on her/his fork (e.g. otheruser/foobar:patch).
  3. Opening a pull request on Github, enabling, "Allow edits from maintainers".

现在,我希望修改此拉取请求.以下

Now I wish to amend this pull request. Following Github's reader, I:

  1. 克隆叉子:

  1. Cloned the fork:

cd forks
git clone https://github.com/otheruser/foobar.git

  • 检出了用于打开拉取请求的分支:

  • Checked out the branch used to open the pull request:

    cd foobar
    git checkout patch
    

  • 已进入分支机构.

  • Committed to the branch.

    ...
    git add -A
    git commit -m "Amendments" 
    

  • 现在,我希望推送更改:

    Now I wish to push the changes:

    git push origin patch
    

    但是Github提示我输入用户名和密码,然后回复:

    But Github prompts me for my username and password and then responds:

    remote: Invalid username or password.
    fatal: Authentication failed for 'https://github.com/otheruser/foobar.git/'
    

    所以我的问题是:我如何使用维护者/所有者的身份来编辑请求请求?

    推荐答案

    您的步骤听起来正确.

    You steps sound correct.

    您是否检查过许可问题是否确实与推送到对方的仓库有关?您的错误消息听起来确实与错误的用户名/密码有关.

    Have you checked if the permission problem is really related to pushing to the other's repo? Your error message does sound like it may be related to wrong username / password.

    • 如果您使用相同的步骤来推送您的仓库-可以吗?
    • 您通常使用http://回购URL和用户名/密码吗?您是否尝试过使用git@ ... URL切换到SSH密钥过程(您可以在GitHub上使用克隆"或下载"按钮时进行切换).这样做的另一个好处是,使用ssh密钥可以使您的工作流程更加顺畅:您不必一直输入用户名/密码,可以使用密码保护SSH密钥,并在每个会话中输入一次密码.
    • If you use the same procedure to push to your repo - does it work?
    • Do you usually use http:// repo URL and username / password? Have you tried switching to SSH key procedure with git@ ... URL (You can switch when you use the clone or download button on GitHub). This has the additional advantage that it gives you a smoother workflow using your ssh key: You do not have to enter username / password all the time, you can protect SSH key with passphrase and enter passphrase once per session.

    这篇关于修改别人的叉子的拉动要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆