Troubleshooting git push - it asks for a user/pass

I'm using git on a new git linux computer. When I do git push, it me asks for user/password.

I've setup git properly, and in fact cloning the repo from github into a new folder works perfectly (using my public key, not the readonly copy). When I try to push from a previous clone I made to the same repo I get prompted for a user/pass.

Of course sshing into [email protected] works, and I made sure my public key is configured in github. Any ideas how to continue debugging?


this occurs because you did

git clone https://github.com/username/repo

instead of

git clone [email protected]:username/repo.git

Try the following:

git remote set-url origin [your git url, such as [email protected]:.../project.git]


What do you mean by previous repo? Check the url of the origin from the previous repo's .git/config file. If you had cloned using http, it will ask for user/pass.