Pushing to a friends repo

Viewed 241

I have cloned a friends git repo using the url by

git clone https://github.com/user/repo_name.git

I then created my branch, committed and attempted to push my code to a new branch, by

git push --set-upstream origin my_branch_name 

However, I get the following message after entering my username and password correctly (I checked)

remote: Permission to user/reo_name.git denied to my_git.
fatal: unable to access 'https://github.com/user/repo_name.git/': The requested URL returned error: 403

I'm new to git so I have no clue what I've done wrong/need to do

1 Answers

Unless you're listed as one of the repository's contributor, you can't push changes directly to it.

You should fork the repository in order to create a personal copy of the original repository.

After you have it under your username, you should create a branch, propose changes, and create a pull-request to the original repository.

Related