Jayy
Jayy

Reputation: 14808

Composer: cache private GIT repository on BitBucket

I have project X which depends on project Y, each has their own composer.json file. Y is held in a private GIT repository on bitbucket.

X's composer.json looks like this:

{
    "name": "jodes/X",
    "require": {
        "monolog/monolog": "@stable",
        // .....
        "jodes/Y": "dev-master"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://bitbucket.org/Jodes/Y.git"
        }
    ]
}

It installs monolog and other public packages that are hosted on packagist quickly, but it never caches Y, so runs slowly.

How can I make it cache Y so it installs quickly?

Upvotes: 0

Views: 561

Answers (1)

Abhijeet Kamble
Abhijeet Kamble

Reputation: 3201

To Solve your problem you have to change your HTTPS request to HTTP. As per the documentation provided by Composer, it only supports Basic HTTP authentication.

{
    "name": "jodes/X",
    "require": {
        "monolog/monolog": "@stable",
        // .....
        "jodes/Y": "dev-master"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "http://bitbucket.org/Jodes/Y.git"
        }
    ]
}

Please find the links for documentation here.

Upvotes: 1

Related Questions