Home  >  Article  >  Operation and Maintenance  >  Four steps to set up Linux git command without entering password

Four steps to set up Linux git command without entering password

藏色散人
藏色散人forward
2021-09-10 17:08:593611browse

The following column linux system tutorial will introduce to you how to set the git command under Linux without entering a password. I hope it will be helpful to friends in need!

1. In the ~/ directory, touch to create the file.Git-credentials

touch .git-credentials
vim .git-credentials

Click "i" to enter Edit file mode

https://{username}:{password}@github.com
例如 
https://zhang3:12345@github.com

Click "ESC" and then enter ":wq" to exit editing and save

2. Execute in the terminal

git config --global credential.helper store

3. You can see~/ .gitconfig file, there will be one more item:

vi .gitconfig Enter
and you can see
[credential]

helper = store

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

Recommended learning: "linux video tutorial"

The above is the detailed content of Four steps to set up Linux git command without entering password. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete