packeton icon indicating copy to clipboard operation
packeton copied to clipboard

Packeton is not respecting config.json (composer)

Open vigri opened this issue 4 years ago • 3 comments

Hi there,

I've setup a Packeton instance in my local network. When I try to add a package from a server which is on my local network too I get an error:

image

I'm aware of the risks, but since this is a test-setup in my local network this shouldn't be a problem.

According to the manual secure-http should be set to false inside config.json to enable http-connections.

https://github.com/vtsykun/packeton#ssh-key-access-and-composer-oauth-token says the .config.json should be placed inside the root-directory of the app under .composer/config.json

This is what my config.json looks like

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

Unfortunately the error remains.

Can you tell me please how to debug this error further?

vigri avatar Jun 18 '20 13:06 vigri

Hi, you need to place this file relative to the home directory of web-server, i.e ~/.composer/config.json, /var/www/.composer/config.json, but not inside the root-directory of the application.

vtsykun avatar Jun 18 '20 15:06 vtsykun

Hello @vtsykun, thanks for your reply.

I've tried both:

bash-4.4$ cat ~/.composer/config.json
{
    "config": {
        "secure-http": false
    }
}

and

bash-4.4$ cat /httpdocs/web/xxxxxx/.composer/config.json
{
    "config": {
        "secure-http": false
    }
}

$_SERVER['DOCUMENT_ROOT'] is /httpdocs/web/xxxxxx/web

Still the same problem :(

vigri avatar Jun 18 '20 15:06 vigri

You need to use $_SERVER['HOME'] Please, can you check phpinfo to see web home dir?

Selection_202

vtsykun avatar Jun 18 '20 15:06 vtsykun