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 https://github.com/moby/moby
-
On your Sourcegraph instance, navigate to your Site Admin by clicking on your profile icon and selecting Site admin.
-
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.
-
Click on the Github option.
-
Replace
<access token>
with your GitHub access token. If you don’t have one yet see GitHub API token and access.{ "url": "https://github.com", "token": "<access token>", "orgs": [] }
-
Click on Add a single repository and replace
<owner>/<repository>
with your selected repo's name and owner (in this case"moby/moby"
). -
Make sure to click on the Add repositories button below to save your changes.