Roots Discourse

Trellis + Bedrock Private Composer Repositories


I’m just starting out with Trellis + Bedrock and may be missing a few pieces of the puzzle.

I have a Bedrock site set up, which requires a licensed plugin. This is set in the composer.json file after following the instructions here >

I have Trellis set up too, and can spin up my dev site no problem. The problem I’m now having is with deployments. I have a server ready, it’s provisioned and Ansible can connect to it but when a deployment gets to “Install Composer dependencies” it fails at the private repository.

I’ve added my SSH key to the group_vars/all/known_hosts with the name “”, and I can clone the repository using my SSH key locally so I’m not sure what else to try from here.

Can someone please shed some light?

If you delete the licensed plugin on your dev site and then run composer install, is it able to install the plugin again?

I use an auth.json file with a github personal access token in the site directory. It’s technically not the best thing to include in a repo, but the site’s repo is private, too.

The file looks usually likes this:

    "github-oauth": {
        "": "[my-personal-access-token]"

I think you could also create a deploy hook in Trellis to copy the auth.json file from you dev environment to the remote server during a deployment, instead of committing it to the repo. I’ve been meaning to do that, but haven’t gotten around to it.