#Installing already existing laravel application with private packages

2 messages · Page 1 of 1 (latest)

marsh kayak
#

One of my teammates created a Laravel application which uses a few private packages and also uses laravel sail. The composer.json file contains this:

"repositories": [
    {
        "type": "composer",
        "url": "URL TO SATIS PRIVATE REPOS HERE"
    }
],

According to laravel sail documentation, the way to install dependencies on an already existing application is this:

docker run --rm
-u "$(id -u):$(id -g)"
-v "$(pwd):/var/www/html"
-w /var/www/html
laravelsail/php81-composer:latest
composer install --ignore-platform-reqs

However, when i run it it fails when it tries to install the first private package and shows the following message:

Failed to execute git clone --mirror -- '[email protected]:PACKAGENAME' '/.composer/cache/vcs/git-bitbucket.org-org:PACKAGENAME'

fatal: could not create leading directories of '/.composer/cache/vcs/git-bi tbucket.org-PACKAGENAME'

My teammate told me that when he was installing the packages (via sail composer require privatepackagename) it was asked for auth details and in my case is not asking for anything.

Do I need to pass my ssh credentials to the docker run command? If so, how?

Thanks in advance

mint mica
#

Looks like it's trying to install through git, you could try using the --prefer-dist flag for composer install