Skip to main content
NoteGitlab Enterprise is only supported on env zero Organizations signed up for our Self-Hosted Agent.

Initial GitLab Enterprise Setup

For env zero to be able to clone your code and post back commit statuses when running Plan on Pull Request you need to provide it with an access token with write permissions. This only needs to be done once for your Organization.
  1. Create a Personal access token on your GitLab Enterprise.
  • We recommend creating the token for a bot user - as that is the user that will post back commit statuses and comments.
  • The user must have access to each repository you would like to be able to use with env zero. For each project, the user should have at least Maintainer/Owner permissions.
  • The token must have the “read_repository” and “api” scopes defined.
  1. Encode the personal access token in base64, and use it in the K8S agent installation process as a helm value - gitlabEnterpriseCredentialsEncoded. Check out our Self-Hosted K8S agent docs for more information.
  2. Install/update the agent with the new value

Webhooks Integration

Adding Webhooks is required in order to support Continuous Deployment and our Plan on Pull Request features on Gitlab Enterprise.
  1. Open your repository page in GitLab Enterprise.
  2. Click on the settings icon.
  3. Enter the Webhooks page.
  4. Copy and paste the URL and Secret values from the env0 Template creation page.
    1. Navigate to env zero > Organization Settings > VCS tab.
    2. Find your Gitlab Self-Hosted connection, and click the pencil icon.
    3. In the modal that pops up, click on ‘“Webhook Settings”.
    4. A new modal will pop up that contains the Webhook URL and Webhook Secret.
  5. Check the “Push events”, “Merge request events” and “Comments” events.
  6. Click on the “Add webhook” button.
GitLab Enterprise webhook creation interface

GitLab Enterprise webhook creation

I