Add a GitHub repository to Sourcegraph

This guide shows how to add a GitHub repository to your Sourcegraph instance. For the purposes of the guide we’ll be using

  1. On your Sourcegraph instance, navigate to your Site Admin by clicking on your profile icon and selecting Site admin.

  2. In the Repositories section in the left bar, click on Manage repositories. If you have already configured a GitHub code host connection, click on the Edit button and skip to step 5. If you haven’t, click on Add repositories.

  3. Click on the Github option.

  4. Replace <access token> with your GitHub access token. If you don’t have one yet see GitHub API token and access.

        "url": "",
        "token": "<access token>",
        "orgs": []
  5. Click on Add a single repository and replace <owner>/<repository> with your selected repo's name and owner (in this case "moby/moby").

  6. Make sure to click on the Add repositories button below to save your changes.