Composer + Trellis + Bedrock Private Composer Repositories

Thanks @cheezman :raised_hands: :raised_hands: :raised_hands: :100:

this trick worked, you made my day :+1:

I was able to update the auth.json file on the staging server following your suggestion.

then I think that I realised why I had this error AnsibleUndefinedVariable: 'vault_github_token' is undefined, I think that the problem was in the auth.json file. (thanks to @mZoo and Interactive console authentication for 3rd party repository on deploy - #16 by mZoo)

Before it was like

# trellis/deploy-hooks/auth.json.j2
{
  "http-basic": {
    "github.com": {
      "username": "{{ vault_github_user }}",
      "password": "{{ vault_github_pass }}"
    }
  }
}

I updated this in

{
  "http-basic": {
    "github.com": {
      "username": "{{ vault_wordpress_env_defaults.vault_github_user }}",
      "password": "{{ vault_wordpress_env_defaults.vault_github_pass }}"
    }
  }
}

thanks all :raised_hands:

2 Likes