Connect a source repository
Connect GitHub, GitLab, or Bitbucket repositories to a Helix project so agents can read and commit to your code.
Helix needs access to your repository to index it for code intelligence, clone it into agent sandboxes, and push agent commits. This guide covers connecting repositories for all three supported source control providers.
GitHub
Helix Cloud
- Inside a project, go to the Repositories tab
- Click Connect & Browse
- Follow the GitHub OAuth flow — Helix requests repository access scoped to the repositories you select
- Pick the repositories to attach to this project
- Click Save
Helix will index the repository immediately. Semantic search and the wiki become available once indexing is complete (a few minutes for most repos, longer for very large ones).
Self-hosted
If your Helix is behind a firewall and GitHub.com can't reach it, you'll need to configure a GitHub App manually:
- Go to Settings → Source Control in the Helix admin panel
- Follow the GitHub App setup instructions — Helix will generate the App manifest and callback URL
- Install the App on your GitHub organization and select the repositories
For GitHub Enterprise Server, also set HELIX_GITHUB_BASE_URL to your GHES URL in your Helix configuration.
GitLab
- Go to Settings → Source Control → GitLab in the Helix admin panel
- Create a GitLab OAuth application in your GitLab instance:
- Redirect URI:
https://your-helix-url/api/v1/oauth/callback/gitlab - Scopes:
api,read_user,read_repository
- Redirect URI:
- Paste the Client ID and Secret into the Helix settings
- In a project, click Connect & Browse and authorize with your GitLab account
Works with gitlab.com and self-hosted GitLab instances.
Bitbucket
- Go to Settings → Source Control → Bitbucket in the Helix admin panel
- Create an OAuth consumer in your Bitbucket workspace settings:
- Callback URL:
https://your-helix-url/api/v1/oauth/callback/bitbucket - Permissions: Repositories (Read, Write), Pull requests (Read, Write)
- Callback URL:
- Paste the Key and Secret into the Helix settings
- In a project, click Connect & Browse and authorize with your Bitbucket account
Multiple repositories per project
A project can have multiple repositories attached. This is useful when:
- The feature spans a frontend and backend in separate repos
- You want the agent to have access to a shared library repo
- You're using Goose recipes stored in a separate repo
One repository is designated primary — that's the repository the agent clones first and where it opens pull requests by default. Set the primary repo on the Repositories tab.
Detaching a repository
Go to the Repositories tab, click the three-dot menu on the repository, and click Detach. This removes it from the project but does not delete the repository or its code. The agent will no longer have access to it on future tasks.