You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This request is not a duplicate of an existing issue
This is not a personal support request that should be posted on the Roots Discourse community
Summary
./trellis/.vault_pass is required for the trellis dotenv task to run. It'd be great if the dotenv command either:
Automatically generates ./trellis/.vault_pass if missing during trellis init OR trellis dotenv
Or throws an error message that informs the user to create one before running the task
Motivation
trellis new creates the ./trellis/.vault_pass but it isn't a commited file, so when a new user clones the repo/project + runs trellis init the vault pass is not created, leading to the error below.
Additional Context
Current error message from trellis dotenv on a project without a .vault_pass file
The text was updated successfully, but these errors were encountered:
Sorry for the delay @mike-sheppard and thanks for the good issue!
@tangrufus had started looking into this in #302 and then I was starting to prioritize fixing this after another report. I went down a similar path as @tangrufus to try to validate that a Vault pass file existed.
However, a .vault_pass isn't actually required. It's only required if the files are already encrypted. In those cases, generating a new password file isn't correct since you'd need the original password that was used to encrypt them.
Example:
developer A creates a project + pushes it git
developer B clones repo, runs trellis dotenv
💣 fails because B is missing .vault_pass
The solution is for B to get the password from A and create that file locally.
So ultimately I think the best solution is to just output the proper error message which will point anyone in the right direction:
trellis dotenv
[✘] Error templating .env file
[WARNING]: Error getting vault password file (default): The vault password file
/Users/scottwalkinshaw/dev/trellis/.vault_pass was not found
ERROR! The vault password file /Users/scottwalkinshaw/dev/trellis/.vault_pass was not found
#319 will do this and also fixes the hidden error output in a few other commands.
Terms
Summary
./trellis/.vault_pass
is required for thetrellis dotenv
task to run. It'd be great if the dotenv command either:./trellis/.vault_pass
if missing duringtrellis init
ORtrellis dotenv
Motivation
trellis new
creates the./trellis/.vault_pass
but it isn't a commited file, so when a new user clones the repo/project + runstrellis init
the vault pass is not created, leading to the error below.Additional Context
Current error message from
trellis dotenv
on a project without a.vault_pass
fileThe text was updated successfully, but these errors were encountered: