https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password
git remote -v
------------------------------------------------
Permanently authenticating with Git repositories
Run the following command to enable credential caching:
$ git config credential.helper store
$ git push https://github.com/owner/repo.git
Username for ‘https://github.com‘: <USERNAME>
Password for ‘https://[email protected]‘: <PASSWORD>
You should also specify caching expire,
git config --global credential.helper ‘cache --timeout 7200‘
After enabling credential caching, it will be cached for 7200 seconds (2 hour).
原文地址:https://www.cnblogs.com/oxspirt/p/11809123.html
时间: 2024-11-08 16:25:49