Connect a Git repository

View as Markdown

Connect the Fern Dashboard to the repository containing your Fern documentation. Once connected, your docs automatically deploy when you push changes, and Fern Editor commits edits back to the repository.

GitHub

To complete the repo connection, you need:

  • Admin access to the GitHub organization where the repository exists
  • The Fern GitHub app installed on the repository
1

Open the Dashboard

Navigate to the Fern Dashboard and select your documentation site.

2

Connect your repository

In the Overview tab, Find the Source section and select Connect repo. Follow the prompts to authorize the Fern API GitHub app.

3

Install the GitHub app

If you haven’t already installed the Fern GitHub app, you’ll be prompted to install it on your repository. You must be an admin on your GitHub organization to complete this step.

4

Select your repository

Choose the repository containing your Fern documentation. Once connected, Fern automatically deploys your documentation when you push changes to the configured branch.

GitLab

GitLab has no equivalent of the Fern GitHub app, so Fern configures the connection with an access token you provide.

1

Create an access token

Create a personal access token in GitLab with the read_user, api, write_repository, read_repository, and read_api scopes. Set a long expiration to avoid interrupting deployments and Editor sessions: you can revoke the token at any time.

2

Send the token to Fern

Contact Fern support via Slack or email with your access token and GitLab repository URL.

3

Connect your repository

Once Fern configures the connection, select Connect repo in the Source section of the Overview tab and choose your repository. Fern Editor changes on GitLab arrive as merge requests.