1. In the ~/ directory, touch to create the file.Git-credentials
touch .git-credentials vim .git-credentials
Copy after login
Click "i" to enter Edit file mode
https://{username}:{password}@github.com 例如 https://zhang3:12345@github.com
Copy after login
Click "ESC" and then enter ":wq" to exit editing and save
2. Execute in the terminal
git config --global credential.helper store
Copy after login
3. You can see~/ .gitconfig file, there will be one more item:
vi .gitconfig Enter
and you can see
[credential]
helper = store
Copy after login
4. Execute the git command again
You only need to enter the correct account and password once. You can skip entering the account and password directly in the future