Four steps to set up Linux git command without entering password

藏色散人
Release: 2021-09-10 17:08:59
forward
3613 people have browsed it

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
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

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template