Kamalone
Kamalone

Reputation: 4115

Not able to push the edited file in github

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.

Upvotes: 1

Views: 1621

Answers (2)

VonC
VonC

Reputation: 1324827

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

https://[email protected]/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).

Upvotes: 2

dunni
dunni

Reputation: 44545

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.

Upvotes: 0

Related Questions