Roots Discourse


Having trouble with repo_subtree_path. I have the same structure as the Trellis example project. In wordpress_sites.yml i have local_path: ../site, in know that is corrent.

But for repo_subtree_path I’ve tried various attempts:

repo_subtree_path: site
repo_subtree_path: ./
repo_subtree_path: .
repo_subtree_path: ""

The errors I’m getting when deploying is for example; repo subtree is set to 'site' but that path does not exist in the repo, Run git archive with subdirectory to populate new build dir], and Fail if composer.json not found.
Composer.json exists in site.

Can’t figure out what am I doing wrong?

Might be a silly question, but have you pushed the commit with the site directory to the remote Git repo?

Trellis does a remote fetch so it can’t just exist on your local computer. You can SSH into your server and go to /srv/www/<site name>/shared/source to see what was cloned from Git.

repo_subtree_path: site is be the correct version though.

Thanks for your answer,

Yes, the repo is pushed. And the paths is like this:
|-- site
|-- trellis

I’m getting this error as well. Anyone know how to fix it?

Did you solve this later?

I wonder if this has something to do with Ansible? My colleague has Ansible 1.9.3 and don’t get this error. I’ve got ansible and get this error every time.

We have the same folder structure and envionment otherwise. No difference.

TASK [deploy : Fail if project_subtree_path is set incorrectly] **************** fatal: []: FAILED! => {"changed": false, "failed": true, "msg": "subtree is set to 'site' but that path does not exist in the repo. Edit `subtree_path` for '' in `wordpress_sites.yml`."} to retry, use: --limit @deploy.retry

@swalkinshaw @davehealy

@urre Just try to remove the repo_subtree_path line and see what you get.

No difference i’m afraid.

Having the same issues…

Ran the Git init from the ‘site’ directory

contents of site directory sat in bitbucket nicely

but cannot deploy as this error.

repo subtree is set to 'site' but that path does not exist in the repo. Edit

repo_subtree_path for ‘’ in wordpress_sites.yml.

Git init should be run in the parent folder of site if you have repo_subtree_path set.

See the example structure. And the example from our docs:

I got this error and was a bit confused because I have used the same set up before. Turns out I hadn’t pushed the repo so it couldn’t find the site files.