V
V
vitalyg2016-08-25 13:50:38
Composer
vitalyg, 2016-08-25 13:50:38

How to download a package from a non-https resource?

Actually, the problem itself is that composer takes everything from https resources ...
Having created my own "mini" repository, there was a problem with certificates.
Composer at an entrance on https - swears on the certificate...
On http - does not want to come.
But, in the composer itself there is a setting that disables https checks ...
Actually the config:

{
    "name": "testr/test",
    "description": "test of test",
    "license": "MIT",
    "repositories" : [
        {"type" : "composer", "url" : "http://packages.dev.loc/"}
    ],
    "authors": [
        {
            "name": "onetwo",
            "email": "[email protected]"
        }
    ],
    "require": {
         "one/ine": "1.24"
    }
}

And there is a second config disabling https...
{
    "name": "testr/test",
    "description": "test of test",
    "license": "MIT",
    "repositories" : [
        {"type" : "composer", "url" : "http://packages.dev.loc/"}
    ],
    "config":[
    {"secure-http":false}
    ],
    "authors": [
        {
            "name": "onetwo",
            "email": "[email protected]"
        }
    ],
    "require": {
         "one/ine": "1.24"
    }
}

already swears
[Composer\Json\JsonValidationException]
  "./composer.json" does not match the expected JSON schema:
   - config : Array value found, but an object is required

Actually how to disable "correctly" https ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-08-25
@alexey-m-ukolov

It is written that you specify an array instead of an object. It should be like this:

"config": {
    "secure-http": false
},

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question