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

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

    The composer documentation mentions that you can prevent it from using the GitHub API, so that it acts like git clone:

    If you set the no-api key to true on a GitHub repository it will clone the repository as it would with any other Git repository instead of using the GitHub API. But unlike using the git driver directly, composer will still attempt to use GitHub's zip files.

    So the section would look like this:

    "repositories": [
        {
            "type": "vcs",
            "no-api": true,
            "url": "https://github.com/your/repo"
        }
    ],
    

    Keep in mind that the API is there for a reason. So it this should be a method of last resort regarding the increased load on github.com.

提交回复
热议问题