aboutsummaryrefslogtreecommitdiffstats
path: root/dispatch.sr.ht/configuration.md
blob: 5ef95aa60b1a03a8499b913a5916e68e323ebe19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: dispatch.sr.ht Configuration
---

This document covers the configuration process for dispatch.sr.ht.

Each dispatch.sr.ht provider is optional, you may skip the integrations you do
not need.

# OAuth

## GitHub

To set up OAuth for GitHub:

1. Register under [GitHub OAuth Apps](https://github.com/settings/developers).
   For the `Authorization callback URL` use the URL of your service instance
   with `/github/callback` appended (e.g.,
   `https://dispatch.sr.ht/github/callback`).
2. Place the `Client ID` and `Client Secret` provided by GitHub into your
   `config.ini` in the `[dispatch.sr.ht::github]` section.

## GitLab

To set up OAuth for GitLab:

1. Register under [GitLab Applications](https://gitlab.com/profile/applications).
   For the scopes required, select "api". For the callback, specify the URL of
   your service with `/gitlab/callback/<gitlab instance>` appended (e.g.
   `https://dispatch.sr.ht/gitlab/callback/gitlab.com`).
2. Add the instance to your `config.ini` under `[dispatch.sr.ht::gitlab]` as a
   single option, whose key is the FQDN of the GitLab instance in question, and
   whose value is the instance name, "Application ID" and "Secret", separated
   by a colon. For example,

   ```
   [dispatch.sr.ht::gitlab]
   # ...
   gitlab.com=GitLab:application id...:secret...
   gitlab.freedesktop.org=gitlab.freedesktop.org:application id...:secret...
   ```

   Repeat this process for any additional instances you wish to support.