How to save the user name and password on the GIT Windows Client

Source: Internet
Author: User

2. The client uses msysgit + tortoisegit. tortoisegit is only the shell, and msysgit is the truth.

The pull and push operations call the GIT pull and git push commands in msysgit, but the GIT command does not pass the parameters of the user name and password.

What should I do ?... Ask Google, and you need to refine your speech to Google. I am saying "Git Username Password", or Google is awesome. The last article on page 1st provides a clue-Setup
A remote git repository using HTTP with push support and digest auth, see:

Although GoogleArticleIt is for Linux, but it is not easy to think that the problem is in windows. I will not take a look at the solution in Linux. It is difficult to find the answer directly. In more cases, we are looking for clues and constantly thinking about possible solutions in the clues we discover.

Here, ". netrc" is the clue, which continues to say to Google: "Git netrc windows "...

There are 1st "stack overflow" on 5th pages:

Git
-How to Use netrc file on Windows-Stack Overflow

Google's plus 1 is not as powerful as the brand. When we see Stack Overflow, we can see Hope and the impulse to click.

Click here to see the feeling of "Baidu" (abbreviated as "search for her in the crowd:

This is the correct answer. We have already verified it. The solution is described in detail below:

1. Add a home environment variable in windows with the value % USERPROFILE %, for example:

2. Open % home % in "start" run "and create a file named" _ netrc.

3. Open the _ netrc file in notepad, enter the GIT server name, user name, and password, and save the file. Example:

 Machine git.cnblogs.com
Login cnblogs_user ( Note: This is not the full name of the mailbox name. You only need )
Password cnblogs_pwd

Solve the problem, git is more powerful!

Reprinted from http://www.cnblogs.com/dudu/archive/2011/07/06/git_save_username_password.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.