Is there a way to cache GitHub credentials for pushing commits?

后端 未结 24 3326
囚心锁ツ
囚心锁ツ 2020-11-21 05:02

I recently switched to synchronizing my repositories to https:// on GitHub (due to firewall issues), and it asks for a password every time.

Is there a way to cache t

24条回答
  •  悲哀的现实
    2020-11-21 05:17

    It is better to use credentials for security, but you can keep it for some time using the cache:

    git config --global credential.helper cache
    git config credential.helper 'cache --timeout=3600'
    

    Your credentials will be saved for 3600 seconds.

提交回复
热议问题