Skip to content

Commit 5b9c378

Browse files
kylecarbsmatifali
andauthored
docs: add steps for registering a github app with coder (#7976)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
1 parent 9df9ad4 commit 5b9c378

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

docs/admin/git-providers.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Git Providers
22

3-
Coder integrates with git providers so developers can authenticate with repositories within their workspace.
3+
Coder integrates with git providers to automate away the need for developers to authenticate with repositories within their workspace.
44

55
## How it works
66

7-
When developers use `git` inside their workspace, they are first prompted to authenticate. After that, Coder will store/refresh tokens for future operations.
7+
When developers use `git` inside their workspace, they are prompted to authenticate. After that, Coder will store and refresh tokens for future operations.
88

99
<video autoplay playsinline loop>
1010
<source src="https://github.com/coder/coder/blob/main/site/static/gitauth.mp4?raw=true" type="video/mp4">
@@ -15,7 +15,7 @@ Your browser does not support the video tag.
1515

1616
To add a git provider, you'll need to create an OAuth application. The following providers are supported:
1717

18-
- [GitHub](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) (GitHub apps are also supported)
18+
- [GitHub](#github-app)
1919
- [GitLab](https://docs.gitlab.com/ee/integration/oauth_provider.html)
2020
- [BitBucket](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)
2121
- [Azure DevOps](https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops)
@@ -31,6 +31,27 @@ CODER_GITAUTH_0_CLIENT_ID=xxxxxx
3131
CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
3232
```
3333

34+
### GitHub
35+
36+
1. [Create a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) to enable fine-grained access to specific repositories, or a subset of permissions for security.
37+
38+
![Register GitHub App](../images/admin/github-app-register.png)
39+
40+
2. Adjust the GitHub App permissions. You can use more or less permissions than are listed here, this is merely a suggestion that allows users to clone repositories:
41+
42+
![Adjust GitHub App Permissions](../images/admin/github-app-permissions.png)
43+
44+
| Name | Permission | Description |
45+
| ------------- | ------------ | ------------------------------------------------------ |
46+
| Contents | Read & Write | Grants access to code and commit statuses. |
47+
| Pull requests | Read & Write | Grants access to create and update pull requests. |
48+
| Workflows | Read & Write | Grants access to update files in `.github/workflows/`. |
49+
| Metadata | Read-only | Grants access to metadata written by GitHub Apps. |
50+
51+
3. Install the App for your organization. You may select a subset of repositories to grant access to.
52+
53+
![Install GitHub App](../images/admin/github-app-install.png)
54+
3455
### GitHub Enterprise
3556

3657
GitHub Enterprise requires the following authentication and token URLs:
81 KB
Loading
82.1 KB
Loading
29.8 KB
Loading

0 commit comments

Comments
 (0)