I want to push README.md to Github.
Using Ubuntu 14.04LTS
So, I commit in the following steps.
echo "# test" >> README.md
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/user/repo.git
git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/user/repo.git/info/refs
fatal: HTTP request failed
git remote set-url origin https://firstname.lastname@example.org/user/repo.git
$ git push origin master
You have to either use https and enter your password or use ssh (and associate your public ssh key to your github account)