1. Enter the user's home directory
cd ~/
2、建touch .git-credentials
touch .git-credentials (note that there is a "dot" in front of the file name)
3. Edit the file to set the user name and password
vim .git- credentials edited as follows: https: // username: [email protected]
Note: username and password correspond to username and password
4. Generate your git configuration file and execute the following command in any directory:
git config --global credential.helper store
After the execution is completed, a new file called .gitcon fi g will be generated. This file is your git configuration file. You will be familiar with the next operation
. No password is required for any pull, push, or branch (note: after setting these, when first run git is to enter a password, just this once, to
after not necessary), the majority of more than two files are hidden files, like ls command can not see, you can see behind the increase -ah (Ls -a / ls
-l -a)