In order to integrate with GitHub, you need to have permission to install a GitHub App on your GitHub organization/repository. If you do not have those permissions, please ask an admin or a different user with those permissions to create the template
If you would like to create your first GitHub Integrated Template in this env0 organization, please see Create Your First Template instead.
- Click ADD A NEW TEMPLATE on the top left in the Templates screen.
- Pick your template type, pick a name for the template, and then click on NEXT
- Click on the GitHub.com button. Since you have already created a GitHub template in this env0 organization, no such popup will appear, you are now able to pick from repositories known to env0 in your organization
- Pick the repository containing your terraform configuration.
- If you would like to pull the code from a specific revision or branch, enter that in the
Revisionfield. Leaving this field empty will use your default branch, which is usually “master”/"main".
- Enter the folder your Terraform files are located in under
Terraform Folder. If your Terraform files are in the root of the repository, leave this empty.
- Click on NEXT to proceed to the variables section
- Add environment and terraform variables that you'd like to be used during deployment, and then click on NEXT to go to the final "Projects" section
- Pick the projects that you'd like to have access to deploy this template, and then click on DONE to create the template.
Can't find your repository? Check if your GitHub organization has the env0 GitHub App installed, and if the App is allowed access to your repository
- GitHub App is not installed - Simply click on the "add another organization" link underneath the "GitHub Repository" field. You will get a popup allowing you to install the env0 GitHub app on another GitHub organization.
- GitHub App is installed and has access to the repository, but you still can't find your repository - Click on the "add another organization" link and pick you GitHub organization, even though it already has the GitHub App installed. You will now see the env0 GitHub App settings page in GitHub. Edit the repositories that env0 App should have access to (you may also remove and re-pick a repository), and then "Save" your changes.
Got the following error: "GitHub App was not installed because you do not have permissions to install our GitHub App on your organization"? This means that you did not have permissions to install the GitHub App, and instead you have sent a request to another user to install the App. Please cancel that request in GitHub, and ask a different user that has permissions to install the GitHub App to create the template for you.
- A user already accepted your request to install the GitHub App? If so, follow the instructions in the GitHub App is installed and has access to the repository, but you still can't find your repository section above
If you would like to integrate an existing template with GitHub via a GitHub App:
- Go to the Templates screen, and click on Settings for the template you would like to integrate with GitHub.
- Click on the VCS step. From there you can click on the GitHub.com button, and integrate with GitHub as you would for a new template.
Updated 4 months ago