Closed jamesmacwhite closed 2 years ago
@jamesmacwhite are you running nitro composer
or nitro ssh
?
Also, if you are defining the environment variable in your .env composer won't read that by default.
Tried both, but as you say I think it's probably due to COMPOSER_AUTH being in .env.
The auth.json
method works for local dev, pipelines for other environments can use the environment variable, so I guess that's a solution.
Description
I have a Craft 3 project which is trying to pull in a private repo as a composer dependency. I am trying to use the
COMPOSER_AUTH
environment variable as this is portable across all environments.The main composer.json has this:
However upon running
composer update
after adding the dependency I am getting:My .env file contains:
I'm not sure if this is a Nitro thing, but I think I have the correct formatting of storing the token in an environment variable, however it appears composer cannot see it.