Git bash for Windows NOT requesting a password

I am a student and very new to version control software, so it’s hard for me to figure this out. I am using the Google Git repository. To access this repository, I use Git Bash on Windows 7. The problem is that when I click the Step button, I won’t be asked to enter a password. For instance:

First, I set global variables as follows:

git config --global user.name "Your Name" git config --global user.email youremail@gmail.com 

Cloned

 $ git clone https:// UserName@code.google.com /p/repository/ 

Then I made changes to the files / added new files, etc. and added

 $ git add . 

I agree

 $ git commit -m "Message" 

Stretched out to make sure I'm up to date

 $ git pull Already up-to-date. 

But when I click, I do not ask for a password

 $ git push origin master fatal: remote error: Invalid username/password. You may need to use your generated googlecode.com password; see https://code.goo gle.com/hosting/settings 

Any suggestions? Thank you

+4
source share
3 answers

Edit: it looks like you cannot access the Google code successfully by putting the username in the URL (at least since August 2011), see this: netrc not accepted by git


However, this may work:

Taken from the URL shown above (you should visit the site ):

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 blah.blah@gmail.com password mypasswordXXX123

Once you have the above item, it looks like Git Bash, you can update your _netrc file as follows:

echo "machine code.google.com login blah.blah@gmail.com password mypasswordXXX123" > $HOME/_netrc

+3
source

The ufk comment is the correct answer. To be more explicit if you click

 git push https://code.google.com/p/name-of-project/ master 

you will be prompted for a username and password (assuming .netrc is not installed as indicated by OP). Instead of a wizard, you can specify a different branch, but you may not delete the branch.

+2
source

Put the following command in git bash

git config --global core.askpass / usr / libexec / git -core / git -gui - askpass

0
source

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


All Articles