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

后端 未结 24 3948
囚心锁ツ
囚心锁ツ 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条回答
  •  萌比男神i
    2020-11-21 05:05

    Simply include the login credentials as part of the URL:

    git remote rm origin
    git remote add origin https://username:mypassword@github.com/path/to/repo.git
    

    Note: I do not recommend this method, but if you are in rush and nothing else works, you can use this method.

提交回复
热议问题