Skip to main content
Version: Weekly Build

Git Providers

Configure Git provider integrations under codesphere.gitProviders in config.yaml. For each enabled provider, add the corresponding clientId and clientSecret to your prod.vault.yaml secrets file; see Private cloud installer vault secrets.

General structure for each provider

# providerName e.g., github, gitlab
# providerName:
# enabled: true # or false
# url: "Base URL of the provider"
# api:
# baseUrl: "API base URL"
# oauth:
# issuer: "OAuth issuer URL"
# authorizationEndpoint: "OAuth authorization URL"
# tokenEndpoint: "OAuth token URL"
# # Other provider-specific OAuth settings like scope, clientAuthMethod

Generating credentials (examples)

GitLab:

  1. Go to your GitLab Group (or User Settings for a user-level app) > Settings > Applications.
  2. Create a new application (e.g., "Codesphere Git Integration").
  3. Redirect URI / Callback URL: https://<codesphere.domain>/ide/auth/gitlab/callback (replace <codesphere.domain> with your Codesphere domain).
  4. Scopes: Select api, read_repository, write_repository. (Ensure openid, profile, email are also available/selected if needed for user profile info.)
  5. Save the application. You'll get an "Application ID" (gitlabAppClientId) and a "Secret" (gitlabAppClientSecret).

GitHub:

  1. Go to your GitHub organization settings > Developer settings > GitHub Apps > New GitHub App.
  2. Application name: e.g., "Codesphere Git Integration"
  3. Homepage URL: https://<your-codesphere.domain>
  4. Authorization callback URL: https://<your-codesphere.domain>/ide/auth/github/callback
  5. You'll get a "Client ID" (githubAppsClientId) and generate a "Client Secret" (githubAppsClientSecret).
  6. Optionally upload an image as a logo.

Bitbucket (Server/Data Center — typically Application Links for OAuth 1.0a or OAuth 2.0 if supported):

  1. Admin Settings > System > Application Links.
  2. Create a new link. Choose "External Application", "Incoming".
  3. Redirect URL: https://<codesphere.domain>/ide/auth/bitbucket/callback
  4. Permissions: Repository read/write.
  5. You'll get a "Consumer Key" (bitbucketAppsClientId) and "Consumer Secret" (bitbucketAppsClientSecret) or similar, depending on OAuth version.

Azure DevOps:

  1. Register an application in Azure Active Directory.
  2. Redirect URI: https://<codesphere.domain>/ide/auth/azureDevOps/callback (ensure it's added as a Web redirect URI).
  3. Note the "Application (client) ID" (azureDevOpsAppClientId).
  4. Go to "Certificates & secrets" -> "New client secret" to generate azureDevOpsAppClientSecret. Set a reminder to rotate this secret as it has an expiry.
  5. API Permissions: Add permissions for "Azure DevOps" -> user_impersonation and ensure vso.code_full is included in the scope in config.yaml.

Remember to add these client IDs and secrets to your prod.vault.yaml file and encrypt it. Example secret names:

  • githubAppsClientId, githubAppsClientSecret
  • gitlabAppClientId, gitlabAppClientSecret
  • bitbucketAppsClientId, bitbucketAppsClientSecret
  • azureDevOpsAppClientId, azureDevOpsAppClientSecret