ufk
ufk

Reputation: 32104

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?

Upvotes: 5

Views: 5313

Answers (1)

Nick Rolando
Nick Rolando

Reputation: 26167

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

Upvotes: 2

Related Questions