Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.61 KB

File metadata and controls

39 lines (28 loc) · 1.61 KB

Gerrit

Site admins can sync Git repositories hosted on their private Gerrit instance with Sourcegraph so that users can search and navigate the repositories.

To connect Gerrit to Sourcegraph:

  1. Go to Site admin > Manage code hosts > Add code host
  2. Select Gerrit
  3. Set url to the URL of your Gerrit instance.
  4. Provide an admin username and password. A password can be generated by following these instructions. Only HTTP/HTTPS credentials are supported.
  5. Click Add repositories.
{
  "url": "https://gerrit.example.com",
  "username": "<admin username>",
  "password": "<admin password>",
  "projects": [ // If not set, all projects on the Gerrit instance will be mirrored
    "docs",
    "kubernetes/kubernetes"
  ]
}

Repository permissions

By default, all Sourcegraph users can view all repositories. To configure Sourcegraph to use Gerrit's access management, see "Repository permissions".

User authentication

If repository permissions is configured, Gerrit has to be added as an authentication provider. See the authentication documentation.

Configuration

Gerrit connections support the following configuration options, which are specified in the JSON editor in the site admin "Manage code hosts" area.

[View page on docs.sourcegraph.com](https://docs.sourcegraph.com/admin/external_service/gerrit) to see rendered content.