问题描述
另一个用户通过以下方式在我的存储库(例如myself/foorbar
)上提交了拉取请求:
Another user submitted a pull request on my repository (e.g. myself/foorbar
), by:
- 创建叉子(例如
otheruser/foobar
). - 在她/他的叉子上进入一个分支(例如
otheruser/foobar:patch
). - 在Github上打开拉取请求,启用允许维护者进行编辑".
- Creating a fork (e.g.
otheruser/foobar
). - Committing to a branch on her/his fork (e.g.
otheruser/foobar:patch
). - Opening a pull request on Github, enabling, "Allow edits from maintainers".
现在,我希望修改此拉取请求.以下 Github的读者,我:
Now I wish to amend this pull request. Following Github's reader, I:
-
克隆叉子:
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 withgit@
... 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.
这篇关于修改别人的叉子的拉动要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!