Features
Git Connections
Overview

Git Connections

Git Connections let you link your GitHub or GitLab accounts to OEC.sh. Once connected, you can deploy Odoo projects directly from your private repositories.

What You Can Do

  • Deploy Odoo projects from private repositories
  • Access custom addon repositories
  • Pull updates when syncing environments
  • Use multiple Git providers at the same time

Connecting with OAuth (Recommended)

OAuth is the simplest method. It uses your existing Git account login and automatically refreshes access.

  1. Go to Settings in the sidebar
  2. Click Git Connections
  3. Click Add Git Connection
  4. Select your provider (GitHub or GitLab)
  5. Click Connect with GitHub or Connect with GitLab
  6. Authorize OEC.sh in the popup window
  7. Your connection appears in the list

For GitLab self-hosted instances, enter your GitLab URL before clicking Connect.

Connecting with Personal Access Token

Personal Access Tokens give you more control over permissions and work well for automation.

To create a GitHub token:

  1. Go to GitHub Settings → Developer settings → Personal access tokens
  2. Click Generate new token (classic)
  3. Set an expiration date (90 days recommended) and select the repo and read:org scopes
  4. Copy the token (starts with ghp_)

To create a GitLab token:

  1. Go to GitLab Preferences → Access Tokens
  2. Set an expiration date and select api and read_repository scopes
  3. Copy the token (starts with glpat-)

To add your token to OEC.sh:

  1. Go to SettingsGit Connections
  2. Click Add Git Connection
  3. Select your provider (GitHub or GitLab)
  4. Choose Personal Access Token (or GitLab Token for GitLab)
  5. Enter a name and paste your token
  6. Click Create Connection

Connecting with GitHub App

GitHub Apps provide fine-grained permissions and are ideal for organizations.

  1. Go to SettingsGit Connections
  2. Click Add Git Connection
  3. Select GitHub as the provider
  4. Choose GitHub App as the authentication method
  5. Enter:
    • App ID: Found in your GitHub App settings
    • Installation ID: Found in the URL when viewing your app installation
    • Private Key: Generate and download from your GitHub App settings
  6. Click Create Connection

GitHub Apps allow repository-level access control and don't expire like tokens.

Selecting Repositories

After connecting, you can browse your repositories when creating or editing projects.

  1. Create a new project or edit an existing one
  2. Click the repository dropdown and choose your Git connection
  3. Search or scroll to find your repository
  4. Select the repository and choose a branch

Repositories are sorted by recent activity, so your most-used projects appear first.

Automatic Deployments

When you deploy an environment, OEC.sh automatically clones your repository, pulls the latest code from your selected branch, and installs your Odoo modules.

For OAuth connections, tokens refresh automatically. For Personal Access Tokens, update them before they expire.

Managing Connections

Validating a Connection

  1. Go to SettingsGit Connections
  2. Find your connection in the list
  3. Click the Validate button (checkmark icon)
  4. Check the result message

Refreshing OAuth Token

For OAuth connections that need refreshing:

  1. Go to SettingsGit Connections
  2. Click the Refresh Token button on the connection
  3. The token is automatically refreshed

Enabling/Disabling a Connection

You can temporarily disable a connection without deleting it:

  1. Go to SettingsGit Connections
  2. Click the toggle button on the connection
  3. Disabled connections show an X icon instead of a checkmark

Updating a Token

  1. Create a new token in GitHub or GitLab
  2. Go to SettingsGit Connections
  3. Click Edit on the connection
  4. Paste your new token and click Save

Deleting a Connection

  1. Go to SettingsGit Connections
  2. Click the Delete button (trash icon) on the connection
  3. Confirm deletion
⚠️

Before deleting a connection, make sure no active environments depend on it.

Connection Status

Each connection shows one of these statuses:

StatusMeaning
ActiveWorking normally
ExpiredToken needs refresh or renewal
RevokedToken was revoked on the provider side
ErrorSomething went wrong, check your credentials
InvalidCredentials are invalid or malformed
PendingConnection is being validated

If a connection shows Expired or Error, try validating it first. For OAuth, you can refresh the token or reconnect. For Personal Access Tokens, create a new one and update the connection.

Shared Connections

Git connections are shared with everyone in your organization. When you create a connection, all team members can use it for deployments.

The connection card shows who created each connection for audit purposes.

OAuth connections use the permissions of the person who created them. If that person loses access to a repository, the connection stops working for that repository.

What's Next?

Now that your Git account is connected, you can: