I'm trying to manage a pull request on a repo that I don't own but have admin rights on. When I attempt to pull in changes from another fork, it fails with an error that is less than clear. Here is my workflow...
As an administrator of the main repo, I'm attempting to merge those changes as follows...
git clone [email protected]:dude/project.git
git checkout -b gtracy-master master
git pull http://[email protected]/gtracy/project.git master
After entering my password, I get the error message...
error: The requested URL returned error: 401 while accessing
http://[email protected]/gtracy/project.git/ifno/refs
Is this workflow wrong? Is there an easier way to manage my own pull requests?
Thanks!
The GitHub "pull request" help page don't mention it, but I prefer rebasing my work done in a fork on top of the branch from the original repo before submitting any pull request.
That is, I would add the original repo as a remote, fetch the branch to which my pull request will eventually apply, and rebase first my work locally (within my fork) on top of that branch.
That way I make sure all my pull requests will be fast-forwards one.
In your case though, that may not apply if you know that no changes has been published in the original repo since you have forked and worked on your local repo.
For your second part, I would follow the "Merging pull request" part, and add your forked repo as a remote of your original repo clone.
That being said, error 401 "Unauthorized" is mentioned in the GitHub Smart HTTP page:
Don't forget the https part - Git will send your password hashed but unencrypted over the wire, so be sure to use SSL.
In future versions of Git (assuming our patch gets integrated), Git will prompt you for your username if it's not provided and the client gets a 401, so you won't actually have to put your username in the URL - it will just ask you when Git needs it.
So if you want to use the username in your address, try with https.
Or try with http://github.com/gtracy/project.git
(public repo address)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With