I have created a repository on github named pygame. Created a clone and added files and commited.but when I attempt to push I receive the following error:
gi
I recently experienced this problem when setting up a new clone of my github project.
You need to include your username in the URL to your project, in the form
https://user@github.com/project/...
For example, the URL provided for my test github is this:
https://github.com/jdblair/test.git
If I add my username to it, like this, then I'm able to push and pull from github with no problem:
https://jdblair@github.com/jdblair/test.git
It is easiest to use the URL that contains the username starting from when you clone a project.
You can change the URL for an existing project like this:
git remote set-url origin https://user@github.com/project/foo/bar.git
You can use the ssh authentication instead if you want, but that's a separate setup process.