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.
- Go to Settings in the sidebar
- Click Git Connections
- Click Add Git Connection
- Select your provider (GitHub or GitLab)
- Click Connect with GitHub or Connect with GitLab
- 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 more control over permissions and work well for automation.
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 add your token to OEC.sh:
- Go to Settings → Git Connections
- Click Add Git Connection
- Select your provider (GitHub or GitLab)
- Choose Personal Access Token (or GitLab Token for GitLab)
- Enter a name and paste your token
- Click Create Connection
Connecting with GitHub App
GitHub Apps provide fine-grained permissions and are ideal for organizations.
- 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.
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
- 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.
What's Next?
Now that your Git account is connected, you can:
- Create a new project using your repositories
- Deploy an environment with your Odoo code
- Add addon repositories to extend your Odoo installation