Tom de Geus
Tom de Geus

Reputation: 5955

Amend pull request from another-one's fork

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

  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. Cloned the fork:

    cd forks
    git clone https://github.com/otheruser/foobar.git
    
  2. Checked out the branch used to open the pull request:

    cd foobar
    git checkout patch
    
  3. Committed to the branch.

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

Now I wish to push the changes:

git push origin patch

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/'

So my question: How do I use my right as a maintainer/owner to edit the pull request?

Upvotes: 1

Views: 230

Answers (1)

Sybille Peters
Sybille Peters

Reputation: 3230

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.

  • 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.

Upvotes: 1

Related Questions