Git saves username and password Google Code set in windows. netrc another article: finally solve the problem of "Git Windows client saves username and password"

Source: Internet
Author: User
Another article: the problem of "saving the user name and password on the GIT Windows client" is finally solved.

Http://www.cnblogs.com/dudu/archive/2011/07/06/git_save_username_password.html

 

 

It is troublesome to enter the user name and password every time you push the Code, especially when you cannot remember the password. How to Set Google Code:

Add the following to your. Netrc.
Machine code.google.com login XXX@gmail.com password xxx
Make sure the clone URL doesn' t contain your Username:
Git clone https://code.google.com/p/micolog2/

However, this setting does not work in windows, nor does it work in cygwin (this is not sure why ). Later, the method was found on Stack-over-flow. In Windows, the _ netrc file needs to be created in the % home % directory, instead of. netrc.

Open the command line and execute the following command:

1. Set a % home % environment variable and point it to a directory, such as your own user directory.

Setx home % homepath %

2. Create the _ netrc file under the directory.

Notepad % homepath %/_ netrc

3. Fill in the corresponding content, and save and close

Machine code.google.com

Login XXX@gmail.com

Password xxx

Open git bash and execute the pull and push commands.

Http://blog.rexzhao.com/2011/11/29/Google-Code-set-netrc.html

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.