simonhamp / gitamic-support

Documentation and support for Gitamic
https://gitamic.simonhamp.me
Other
0 stars 0 forks source link

You must be using the interactive console to authenticate #2

Open JustinyAhin opened 4 months ago

JustinyAhin commented 4 months ago

Hello @simonhamp

I've purchased the add-on, and I've been struggling trying to get it to work with my Docker setup. My Dockerfile looks like this

ARG PHP_VERSION=8.2
ARG NODE_VERSION=18
FROM fideloper/fly-laravel:${PHP_VERSION} as base

COPY . /var/www/html

RUN --mount=type=secret,id=COMPOSER_AUTH \
    export COMPOSER_AUTH="$(cat /run/secrets/COMPOSER_AUTH)" \
    && COMPOSER_AUTH=$COMPOSER_AUTH composer install

But this commands gives me

30.68 In AuthHelper.php line 205:
30.68
30.68   The 'https://gitamic.composer.sh/download/9a114688-a7e8-493c-80e7-8dad2ba14
30.68   87c/gitamic-2.2.2.zip' URL required authentication (HTTP 401).
30.68   You must be using the interactive console to authenticate
30.68
30.68

while building the image.

Not sure if I got everything right.

Thanks

simonhamp commented 4 months ago

Hi Justin,

Sorry you're having trouble getting it installed.

I'm not familiar with doing this (passing through private package credentials) inside a Docker container, so my first thought would be to try doing this outside of the container first to make sure that the process it's using to add the config is working.

My theory here is that the format coming from your /run/secrets/COMPOSER_AUTH file isn't quite right so Composer is silently rejecting it, thus it's assuming auth needs to be done interactively.

You may need to look at escaping the shell arg $(cat /run/secrets/COMPOSER_AUTH) because of JSON's use of double quotes. How you do that may depend on which shell you're operating under.

Hope this helps!

simonhamp commented 3 months ago

@JustinyAhin were you able to make any progress?