Open navClose nav

Using Private Submodules with Forestry

If your website uses submodules from private repos, you will need to configure your site to allow Forestry to access these submodules. For sites stored on Github or GitLab, our quick setup flow will not grant the correct permissions. This flow adds a deploy key to your GitHub or GitLab repo, which only grants access to a single repository and will not allow Forestry to install private submodules.

To use a site containing private submodules with Forestry, you will need to change the way Forestry authenticates with Github/GitLab by removing this deploy key and instead adding your site’s public key as a user-level key (assuming your user has access to these private submodules.) In your Forestry site, head to Settings > Repository and copy the public key to add it to your Github or GitLab user account.,dpr_auto,f_auto,q_80,w_640/

This will give Forestry access to all of your user’s repos. If you would prefer not to do that, just create a new Github/GitLab user with access to all of the necessary repositories and add the key to their account.

Note that this is typically not an issue for projects stored on Bitbucket or Azure DevOps because you must add Forestry’s public key to your user account (Azure Devops doesn’t have deploy keys, and deploy keys are always read-only for Bitbucket repos.) If you’re having trouble installing private submodules in Bitbucket or Azure DevOps, ensure your user has access to all of the necessary repositories.

Last updated on May 2, 2019