Baidu will have a lot of web pages, and the answer is the same:
Method One:
Set-> git edit Local. Git/config add
Save, enter a password the second time will remember the password
Method Two:
1. Add a home environment variable in Windows with a value of%userprofile%
2. Open%home% in Start > Run to create a new file named "_netrc"
3. Open the _netrc file with Notepad, enter git server name, username, password, and save:
1 |
Machine github.com #git服务器名称 |
Build _NETRC on Windows
1 |
Copy con _netrc #创建_netrc文件 |
3 |
Machine github.com #git服务器名称 |
5 |
Password Password #git密码 |
Enter Ctrl+z after the last line and the file will automatically save and exit
Do not have to repeat the username password when submitting on Git again
But that doesn't solve my problem. Continue search Find this URL:
http://bbs.csdn.net/topics/391881961
or invalid ...
Until you see a word on the Web: Finally, when you next use Git, and then enter your username and password, git will automatically remember it and automatically form one in the C:\Documents and settings\administrator\ directories. Git-credentials file, the file contains your username and password information stored in it.
Then check my directory file, and not this file, but there is a. git-credentials.lock file. So
According to the idea of creating a file continue to explore, guess where the operation is wrong when the mistake has been created. Git-credentials.lock so that no matter how the back is not valid, so I delete%home% environment variables, delete _netrc files, Deletes. Git-credentials.lock,. gitconfig files.
Follow the method again and succeed.
But again to observe C:\Documents and settings\administrator\ directory, and did not see the online said. git-credentials file. As for why to temporarily do not pursue, the problem solves is good.
My problem is that error files caused by misoperation affect the normal settings.