Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Git to prompt for username and password

I closed a PHP project that I posted on google code.

The problem is that when I try to use the following command:

git push origin master

I get the following authentication error message:

fatal: remote error: Invalid username/password.
You may need to use your generated googlecode.com password; see https://code.google.com/hosting/settings

How can I force Git to prompt for username and password in order to resolve this issue?

like image 654
ufk Avatar asked Nov 03 '22 10:11

ufk


1 Answers

See this answer.

Go to the URL in error message you got to get your password, and then follow the instructions.

For Git repositories, you can add the following line to your .netrc file recording your password for each repository domain you have commit access to. Make sure you have set the permissions on .netrc so that only your user account can read it.

machine code.google.com login [email protected] password qwertyasdfg

I'll also quote a comment under that answer that may be helpful:

removing the username from the .git/config forced git to reask for username and password

like image 174
Nick Rolando Avatar answered Nov 07 '22 21:11

Nick Rolando