Sometimes the git cloning takes slightly bit longer than the default timeout of 300s and deployment will fail. For fixing this, I want to set COMPOSER_PROCESS_TIMEOUT to a higher value, like 600s. Where is the right/best place in Trellis for setting this environment variable globally so that composer also uses it during deploy? – Or should this be rather set in a composer config file on the Trellis system?

So I got an error during trellis deploy:

[RuntimeException] Failed to clone [...]

First I assumed this is caused by a timeout, hence I tried to increase the timeout.

Then I noticed that the path to git repository to be cloned pointed to composer cache folder. The cache git repository in cache folder was corrupted.

After running composer clearcache on the target system (so SSH onto the server to which should be deployed and invoke that command there, not on the workstation) the issue went away.

This topic was automatically closed after 42 days. New replies are no longer allowed.