1

I cloned a repo which was created by my friend and I am able modify the files inside the repo and commit.
But while pushing I am getting error:

error: The requested URL returned error: 
       403 while accessing http://github.com/*****/Hello.git/info/refs

fatal: HTTP request failed"

The command I used for pushing is:

git push -u origin master

My friend ( who created the repo ) able to push the modified files with this command.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Kamalone
  • 4,045
  • 5
  • 40
  • 64

2 Answers2

2

Note that for a repo where you are declared as collaborator, you need to use a "Read+Write access" url:

https://UserName@github.com/Name/repoName

In other words, not an http address, but an https one.

Don't forget to set your GitHub crendentials, your proxy (if you have one), and your .netrc (or _netrc on Windows).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Check what `git remote -v` returns, and modify if you need the remote address asociated with '`master`'. – VonC Oct 19 '11 at 10:45
  • Answer is correct. I had the issue of not being able to push, turns out, https sets it right. – firesofmay Jan 08 '13 at 17:48
0

He must add your username as collaborator the project. Otherwise you don't have access rights to push directly to his repository. You can also fork his Github project, push to your forked repository on Github and then send a pull request to your friend.

dunni
  • 43,386
  • 10
  • 104
  • 99