Stop User/Password Prompt When Pushing to GitHub

Every time I committed and pushed something to GitHub, I got a prompt for my username and password. I got annoyed and found a fix.

You need to change your .git/config file from:

[remote "origin"]
  url =
  fetch = +refs/heads/*:refs/remotes/origin/*


[remote "origin"]
  url = [email protected]:mike1e/first_app.git
  fetch = +refs/heads/*:refs/remotes/origin/*

by entering this issuing this command in your Terminal while in the git project directory. Make sure to substitute the correct information.

git config remote.origin.url [email protected]:
Show Comments