Git Checked against Coresmith 0.8.44.
Connect GitLab or Bitbucket
Once GitLab or Bitbucket is connected, its repositories show up in Add an app, and pushes start deploys within seconds.
Connect
- Open Settings, Git, and connect GitLab or Bitbucket.
- Approve the access it asks for:
| Provider | Access |
|---|---|
| GitLab | read_repository, read_api and api. Coresmith needs api to add deploy keys and webhooks. |
| Bitbucket | repository, webhook and repository:admin. |
Coresmith uses the connection to list repositories and to tell your provider to report pushes. To get the code, each app gets its own read-only deploy key, which Coresmith adds to the repository. An app can read only its own repository.
On self-hosted Coresmith
A self-hosted install needs an OAuth app of your own at GitLab or Bitbucket. Until one is set up, Settings, Git says the provider isn't set up on this install.
- Create an OAuth app at GitLab or Bitbucket with the access above. Its callback address is Coresmith's address followed by
/settings/source-providers/gitlab/callback, or/settings/source-providers/bitbucket/callback. - On Coresmith's server, add its ID and secret to
/opt/coresmith/shared/.env, asGITLAB_CLIENT_IDandGITLAB_CLIENT_SECRET, orBITBUCKET_CLIENT_IDandBITBUCKET_CLIENT_SECRET. - Load them:
Terminal
cd /opt/coresmith/app && sudo -u coresmith php artisan config:cache && sudo -u coresmith php artisan horizon:terminateDisconnect
Disconnecting revokes Coresmith's access and forgets the connection. The deploy keys stay on each repository, so existing apps keep deploying.