CorfedoCorfedoDocs

Sources

Connect GitHub, GitLab, Gitea, Forgejo, Bitbucket Cloud or Azure DevOps so Corfedo can add and index repositories.

A source is a connection to a code host, such as GitHub or GitLab, that Corfedo adds repositories from. Its credential needs only read access.

Before you begin

  • You are a workspace administrator or have the Repository administrator role.
  • An account on the forge that can read the repositories you want to index.

Add a connection

Choose how to connect

Open Settings › Sources and select Add connection. Choose the code host and the credential:

OptionCredentialAccess it needs
GitHub AppAn app installed on an organization or account, with short-lived tokensRepository permissions Contents and Metadata, read-only
GitHub tokenA fine-grained or classic personal access tokenFine-grained: Contents and Metadata, read-only. Classic: the repo scope.
GitLabA personal, group or project access tokenThe read_api and read_repository scopes, or api
Gitea and ForgejoAn access token on your server, with the account name it belongs toThe read:repository and read:user scopes, and read:organization for organization repositories
Bitbucket CloudA workspace access token or an API token with scopes, with the workspaceRepositories, read-only
Azure DevOpsA personal access token scoped to one organization, with the organizationCode (Read), scoped to the organization

Enter the server

GitHub and GitLab connect to github.com and gitlab.com. For GitHub Enterprise Server or GitLab self-managed, select the option for your own server and enter its Server URL. Gitea and Forgejo always need the server URL. Bitbucket Cloud and Azure DevOps connect to their cloud services only.

Create the credential

The page lists the steps for the forge you chose. Points to watch:

  • GitHub App: for an app owned by an organization, register it under the organization's Settings › Developer settings › GitHub Apps. The installation ID is the number at the end of the installation page's URL.
  • GitHub token: an organization may require an owner to approve a fine-grained token.
  • GitLab: if GitLab asks for a token type, choose Legacy token. A group or project access token needs the Reporter role.
  • Gitea and Forgejo: enter the Account name the token belongs to.
  • Bitbucket Cloud: workspace access tokens need a Premium plan. Repository and project access tokens work too.
  • Azure DevOps: the token must be scoped to this organization only.

Test and save

Enter a Name and the credential and select Test and save. Corfedo tests the credential on the forge before it saves it.

Check: the connection opens and shows Healthy next to its name. It has no repositories yet. Next, add a discovery rule.

Disable or delete a connection

Disable and Delete connection keep its repositories searchable at their last indexed commit, but they stop updating until another connection provides them. Deleting also removes the connection's rules.

Troubleshooting

What you seeWhat to do
The connection was not saved with a reasonThe test on the forge failed. Check that the credential has the access listed above and has not expired, then select Test and save again.
Needs attention on a saved connectionThe last check failed. Open the connection, select Test connection and fix what it reports, for example with Replace credential.
A warning next to ExpiresThe token expires within 14 days. Create a new token on the forge and select Replace credential.

On this page