I am new to Git/GitHub and ran into an issue. I created a test project and added it to the local repository. Now I am trying to add files/project to the remote repository.>
This error occurs when you clone a repo using a call like:
git clone git://github.com/....git
This essentially sets you up as a pull-only user, who can't push up changes.
I fixed this by opening my repo's .git/config file and changing the line:
[remote "origin"]
url = git://github.com/myusername/myrepo.git
to:
[remote "origin"]
url = ssh+git://git@github.com/myusername/myrepo.git
This ssh+git protocol with the git user is the authentication mechanism preferred by Github.
The other answers mentioned here technically work, but they all seem to bypass ssh, requiring you to manually enter a password, which you probably don't want.