First time Git Push for an open source project

Nikhil Cheke
2 min readOct 7, 2020

--

I experienced this when I was contributing to an open source project for the first time. I clone the open source repository in my local, created new local branch and started working on it. When I was done with the changes, I tried to push the changes. But I ended up with this,

remote: Permission to xxxxx/xxx.git denied to [your user name].
fatal: unable to access 'https/github.com/xxxx/xxxx.git':The requested URL returned error: 403

After exploring multiple options as a solution, I found following working solution,

Step 1:

Go to open source repo page,

click on Fork button, which is present in top right corner of the page,

This will take you to your own Github page.

Step 2:

Now clone your forked repository instead of original, for this click on Code button,

Click on https and copy the https link.

Step 3:

Now clone the repo, create your local branch, made the code changes, add and commit those changes and push the code,

1. git clone <git repo https link>
2. git checkout -b <local branch name>
3. git add .
4. git commit -m "<add comments>"
5. git push --set-upstream origin <local branch name>

Step 4:

Go to your Github page and create new pull request.

That’a all ! Now wait for original author to accept it !

Hope this will help you. Happy Coding!

--

--

Nikhil Cheke
Nikhil Cheke

Written by Nikhil Cheke

I am a Software Engineer + Researcher. I take pride in building model that translates data points into business insights.

Responses (1)