In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Preface
Under the command line, we are generally used to using ssh for git operations, but in some cases we can only use the account password when logging in. Every time we need to interact with the git server, such as push, we are prompted to enter the account and password. Often when push and fetch, this operation is quite annoying, so how to save the git password?
In this article, we will introduce two implementation methods. Let's take a look at the detailed introduction.
Method one
First create the. git-credentials under the home directory, and then enter:
Https://{username}:{password}@github.com
If there are multiple, one line at a time,: wq save exit
Then execute the command at the terminal
Git config-global credential.helper store
If we see the following in the ~ / .gitconfig file, it means we are successful.
[credential] helper = store
Method two
This method requires git version > = 1.7.10. Use git version to check the version number to see if it supports it. If you do not support it and want to use it, upgrade the git version yourself.
Execute under the terminal
Git config-global credential.helper cache
The password will be cached for 15 minutes by default. If you want to change it longer, such as 1 hour, then you can
Git config-global credential.helper 'cache-timeout=3600'
The 3600 here refers to seconds. You can change it at other times.
Summary
The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.