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.
Figured it out. I cloned over HTTPS. Setting up my public SSH keys, cloning over SSH, and pushing over SSH fixed it.
I faced the same error and the cause was stupid - I did not have privileges to commit to selected repository. I did not know that I have to
as described in https://help.github.com/categories/63/articles
what worked for me is changing from http to ssh:
git remote rm origin
git remote add origin git@github.com:username/repoName.git
then check it with git remote -v
If you are using windows, sometimes this may happen because Windows stores credentials for outer repo (in our case github) in its own storage. And credentials that saved there can be different from those you need right now.
So to avoid this problem, just find github in this storage and delete saved credentials. After this, while pushing git will request your credentials and will allow you to push.
For anyone curious, my mac machine vs lucid vm ran git 1.7.6 vs 1.7.0.4, and the exact same repo was pushable from my mac (newer git) but not the VM
Same curl version. Perhaps some older git versions don't support https pushes?
Add the user name as part of the URL and This error happens because the git command is hitting http instead of https. So set the url
git remote set-url origin https://<username>@github.com/Path_to_repo.git
After which you will be prompted for password: