Trellis [deploy | Copy project local files] - What is this telling me?

I am getting the error below when deploying to production. Can anyone help me understand what this error is actually telling me, and how I correct the problem?

I think this is in regard to rysync on my local machine but I am not sure. I am using a MBP running 10.10.4.

TASK: [deploy | Copy project local files] ************************************* 
failed: [ ->] => (item={'dest': 'web/app/themes/americanshoaltheme', 'src': u'../site/web/app/themes/americanshoaltheme/dist', 'name': 'compiled theme assets'}) => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh  -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/Users/scottstreit/Sites/\" \"web@\"", "failed": true, "item": {"dest": "web/app/themes/americanshoaltheme", "name": "compiled theme assets", "src": "../site/web/app/themes/americanshoaltheme/dist"}, "rc": 12}
msg: rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]

I am making a little bit of progress. After updating my version of rsync via homebrew I have a new rsync error message.

msg: rsync: mkdir "/srv/www/"
failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(674) [Receiver=3.1.0]

Is this a user permissions error?

Given the message No such file or directory, any chance your americanshoaltheme isn’t there in web/app/themes on the server before the rsync is executed? Seems like rsync is failing because the specified destination path doesn’t exist. The rsync copies over your dist directory, but the rest of your theme needs to be there first.

What approach are you taking to deploying your theme?

  • The recommended approach is to commit your theme to the repo that will be cloned and deployed.
  • If that repo above is structured like the example project (vs. structured like just a bedrock repo that includes a theme), you’d also need to uncomment subtree: site, as it is in the example project
  • If you’re taking some other approach to getting the rest of your theme on the server, let us know what it is.

If the repo does include the theme, you might ensure that you have the latest Trellis to avoid the problem fixed by roots/trellis#299.

If you are somehow getting your theme files on there, could you run the deploy once more, let it fail, then ssh into the server and see whether the web/app/themes/americanshoaltheme destination path exists?

1 Like

@fullyint I forgot to uncomment subtree: site. I can do a full deploy now. Thanks for taking the time to help.


@scott_streit Thanks for reporting the solution. It helps make things better for everyone. In this case, it led to a note in the README: roots/

After at least a full weeks worth of hours trying to get this working, the only thing that worked in the end was cloning the example project itself. It worked first go, no hassles. Paying attention to the terminal during deployment, the entire process looks different to what I observed when doing it the ‘right’ way and cloning bedrock, sage and trellis myself.