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

后端 未结 24 3958
囚心锁ツ
囚心锁ツ 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:04

    You can just use

    git config credential.helper store
    

    When you enter password next time with pull or push, it will be stored in file .git-credentials as plain text (a bit unsecure, but just put it into a protected folder).

    And that's it, as stated on this page:

    git-credential-store

提交回复
热议问题