Git Connections
Git Connections link your GitHub, GitLab, or Bitbucket accounts to OEC.sh. Once connected, you can deploy Odoo projects from your private repositories, access custom addon repos, pull updates when syncing environments, and use multiple Git providers at the same time.
Connecting with OAuth (Recommended)
OAuth uses your existing Git account login and automatically refreshes access.
- Go to Settings in the sidebar
- Click Git Connections
- Click Add Git Connection
- Select your provider (GitHub, GitLab, or Bitbucket)
- Click Connect with GitHub, Connect with GitLab, or Connect with Bitbucket
- Authorize OEC.sh in the popup window
- 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 finer control over permissions and work well for automation or CI pipelines.
To create a GitHub token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click Generate new token (classic)
- Set an expiration date (90 days recommended) and select the repo and read:org scopes
- Copy the token (starts with
ghp_)
To create a GitLab token:
- Go to GitLab Preferences > Access Tokens
- Set an expiration date and select api and read_repository scopes
- Copy the token (starts with
glpat-)
To create a Bitbucket token:
- Go to Bitbucket Personal Settings > App passwords
- Click Create app password
- Give it a label and select Repositories: Read and Repositories: Write permissions
- Copy the generated password
To add your token to OEC.sh:
- Go to Settings > Git Connections
- Click Add Git Connection
- Select your provider (GitHub, GitLab, or Bitbucket)
- Choose Personal Access Token (or GitLab Token for GitLab, or App Password for Bitbucket)
- Enter a name and paste your token
- Click Create Connection
Connecting with GitHub App
GitHub Apps provide repository-level permissions and are a good fit for organizations that want tighter access control.
- Go to Settings > Git Connections
- Click Add Git Connection
- Select GitHub as the provider
- Choose GitHub App as the authentication method
- 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
- 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.
- Create a new project or edit an existing one
- Click the repository dropdown and choose your Git connection
- Search or scroll to find your repository
- Select the repository and choose a branch
Repositories are sorted by recent activity, so your most-used projects appear first.
Webhook Setup for Auto-Deploy
Webhooks trigger automatic deployments when you push code. There are three ways to set them up:
Automatic Setup (OAuth Connections)
When you create a project using an OAuth-connected Git account, the webhook is automatically configured:
- Create a new project and select your repository
- Choose a branch to track
- The webhook is created automatically on your repository
- Pushes to the tracked branch trigger deployments
Automatic webhook setup requires an OAuth connection. Token-based connections require manual webhook configuration.
Setup Webhook Button (Existing Projects)
If your project was created without a webhook, you can add one from project settings:
- Go to your Project > Settings tab
- Find the Repository section
- Click the Setup Webhook button
- Select a Git connection with OAuth permissions
- The webhook is created on your repository
The Setup Webhook button only appears if your project doesn't have a webhook configured. You need a Git connection with OAuth permissions for this to work.
Manual Webhook Configuration
For token-based connections or advanced setups, configure the webhook manually:
- Go to your Project > Settings tab
- Find the Webhook section
- Copy the Webhook URL
- Copy the Webhook Secret
- Add the webhook in your Git provider:
For GitHub:
- Go to your repository > Settings > Webhooks
- Click Add webhook
- Paste the Webhook URL
- Set Content type to
application/json - Paste the Webhook Secret
- Select Just the push event
- Click Add webhook
For GitLab:
- Go to your repository > Settings > Webhooks
- Paste the Webhook URL
- Paste the Webhook Secret in the Secret token field
- Check Push events
- Click Add webhook
Auto-Deploy Configuration
Once a webhook is configured, enable auto-deploy for each environment:
- Go to your Environment > Settings
- Find the Auto-Deploy toggle
- Enable auto-deploy
- Optionally configure branch filtering
When enabled, pushing to the tracked branch automatically triggers a deployment for that environment.
Auto-deploy respects branch settings. If your environment tracks the main branch, pushes to develop won't trigger deployments.
Automatic Deployments
When you deploy an environment, OEC.sh 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
- Go to Settings > Git Connections
- Find your connection in the list
- Click the Validate button (checkmark icon)
- Check the result message
Refreshing OAuth Token
For OAuth connections that need refreshing:
- Go to Settings > Git Connections
- Click the Refresh Token button on the connection
- The token is automatically refreshed
Enabling/Disabling a Connection
You can temporarily disable a connection without deleting it:
- Go to Settings > Git Connections
- Click the toggle button on the connection
- Disabled connections show an X icon instead of a checkmark
Updating a Token
- Create a new token in GitHub or GitLab
- Go to Settings > Git Connections
- Click Edit on the connection
- Paste your new token and click Save
Deleting a Connection
- Go to Settings > Git Connections
- Click the Delete button (trash icon) on the connection
- Confirm deletion
Before deleting a connection, make sure no active environments depend on it.
Connection Status
Each connection shows one of these statuses:
| Status | Meaning |
|---|---|
| Active | Working normally |
| Expired | Token needs refresh or renewal |
| Revoked | Token was revoked on the provider side |
| Error | Something went wrong, check your credentials |
| Invalid | Credentials are invalid or malformed |
| Pending | Connection 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.