Git push returning error and not prompting for password

git, github

Solution

You might try changing the URL to use SSH instead of HTTPS. In the root of your repo:

git remote set-url origin git@github.com:thestranger/cfinder.git

This will require that you have a public key registered on your GitHub account.

Problem

I followed the first steps after creating a repository in github, but when I got to the line: `git push -u origin master` it fails with this error: ``` user$ git push -u origin master error: The requested URL returned error: 403 Forbidden while accessing https://github.com/thestranger/cfinder.git/info/refs fatal: HTTP request failed ``` I have remote added the correct origin url and I have git 1.7.10. The weird thing is that it is not prompting me for a username or password at all so I don't know what it's trying to use to access the repository on github. Does anyone know why it wouldn't prompt me for a password? To clarify, the steps I followed were the ones github showed me after immediately creating the repository: ``` touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/thestranger/cfinder.git git push -u origin master ```

Original source