在每次 push 都需要设置账号与密码,那么可以设置记住密码
设置记住密码(默认15分钟):
git config --global credential.helper cache
git config credential.helper cache
如果想自己设置时间,可以这样做(1小时后失效):
git config credential.helper ‘cache --timeout=3600’
长期存储密码:
git config --global credential.helper store
git config credential.helper store
在使用Git时,可以通过设置credential.helper来记住账号和密码,避免每次push都要输入。cache选项默认15分钟内有效,可自定义如1小时(3600秒)的timeout。store选项则会长期存储密码,直到手动清除。
720

被折叠的 条评论
为什么被折叠?



