Gitlab private repo as composer package

Trellis supports setting up composer HTTP basic authentication for multiple repositories since https://github.com/roots/trellis/pull/1091

Rather than generating your own auth.json, you can set the basic auth credentials as:

# group_vars/<env>/vault.yml

vault_wordpress_sites:
  your-site:
    composer_authentications:
      - { hostname: composer.deliciousbrains.com, username: your-deliciousbrains-username, password: your-deliciousbrains-password }

However, Gitlab/GitHub/BitBucket oauth tokens are not supported. PRs are welcomed.

3 Likes