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

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

    After you clone repository repo, you can edit repo/.git/config and add some configuration like below:

    [user]
        name = you_name
        password = you_password
    [credential]
        helper = store
    

    Then you won't be asked for username and password again.

提交回复
热议问题