Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

thoresuenert's avatar

Envoy and local composer installation on remote server

I have the following deploy script:

@task('stage', ['on' => 'staging'])
    cd portal
    git pull origin {{ $branch }}
    php ~/composer.phar update
    php artisan migrate
    php artisan db:seed
@endtask

i tried to add an .bashrc alias for the composer.phar i tried

~/composer.phar
../composer.phar

But i setting an alias has no effect on envoy.

the remote connection quits with this error:

fatal: Invalid refspec '/var/www/vhosts/staging/composer.phar'

but the path is the right one. I cannot find any information about this problem. Anyone has an idea?

0 likes
3 replies
thoresuenert's avatar

@henrique thanks for the information update vs install. Without "php" it will end up with the same error.

I figured out that the error is thrown by git.

Please or to participate in this conversation.