I was able to clone a copy of this repo over HTTPS authenticated. I\'ve made some commits and want to push back out to the GitHub server. Using Cygwin on Windows 7 x64.
This works for me -:
git remote set-url origin https://username@github.com/user/repo.git
Hope it helps
Upgrade your git. GitHub has answered this question at https://help.github.com/articles/error-the-requested-url-returned-error-403.
What worked for me:
My repo was a fork and still linked to the the parents repo.
git remote -v
Will tell you if it is your repo or not.
git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git
Allows you to reconfigure it to your repo and then allow you to push.
The other answers that suggest switching to SSH sort of miss the point. HTTPS is supported, but you must log in with you GITHUB password, not your SSH passphrase (which was what was giving me the same exact error).
I was having the same problem, but making sure to use my actual GitHub password at the terminal password prompt fixed the solution with no alteration to the config, or resorting to SSH.
The reason it is important to note this, is many public institutions (such as my school) will block SSH, but allow HTTPS (which is the only reason I started cloning over HTTPS in the first place).
Hope that helps anyone else having the same issue...
It could be an accounting issue. The Github account of the upstream (private) repo owner may not be financial. I've seen this where the client's credit card expired.
I had the same issue. My case was: I'd initialized git repo locally before I created it on github, then I tried to add remote branch. I solved my issue by changing the order of actions: created a repo on github site, then inited it locally. But it's not the case fr them who like to do all from command line as me.