Force Git request username and password.

I closed the PHP project that I posted in 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 to get Git to request username and password to solve this problem?

+4
source share
1 answer

See this answer .

Go to the URL in the error message you received 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 domain of the repository that you have access to. Make sure you set permissions on .netrc so that only your user account can read it.

 machine code.google.com login user@gmail.com password qwertyasdfg 

I will also quote a comment in this answer, which may be useful:

removing username from .git / config force Git to re-populate username and password

+2
source

Source: https://habr.com/ru/post/1448075/


All Articles