git save the user name and password


We use git when you will possibly need to enter a user name and password operation. To make people feel a little uncomfortable, uncomfortable feeling. This time we can save the settings we used the time to use git user name and password.

first step:

Set a name called the HOME environment variable. The value of the variable is a path, you need to save user name and password for the file path. (Click, properties of the computer -> Advanced System Settings -> Environment Variables -> New -> OK)


Step two:

Create a file called _netrc the file name used to save the username and password, etc., there is no suffix. Open File (available Notepad open).

Fill the contents inside. Content only three lines.
The first line: machine + github URL: machine {git account name} .github.com
second line: login + Username
Third row: password + password

Example:
Machine github.internal.server.aaaa.com
Login zhangsan
password helloword123

Note: _netrc file must be placed in the path environment variable settings.

Guess you like

Origin blog.csdn.net/DreamSonGO/article/details/78331878