Why is Github asking me for a username and password?

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

This is an important tip about ssh and Github. I redid my ssh keys like 5 times before I finally found out what the real problem was.

A common mistake is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking the ssh button left to the URL field and updating the URL of your origin remote like this:

git remote set-url origin git@github.com:username/repo.git

Post external references

  1. 1
    http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password/6565661#6565661
Source