You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allow user to pass gh-app-key directly instead of filename (#1706)
* allow user to pass gh-app-key directly instead of filename
* start fixing tests
* fix make test
* update website with info about new flag
* Apply suggestions from code review
Co-authored-by: Roberto Hidalgo <[email protected]>
Co-authored-by: Roberto Hidalgo <[email protected]>
vcsErr:=fmt.Errorf("--%s/--%s or --%s/--%s or --%s/--%s or --%s/--%s or --%s/--%s must be set", GHUserFlag, GHTokenFlag, GHAppIDFlag, GHAppKeyFileFlag, GitlabUserFlag, GitlabTokenFlag, BitbucketUserFlag, BitbucketTokenFlag, ADUserFlag, ADTokenFlag)
vcsErr:=fmt.Errorf("--%s/--%s or --%s/--%s or --%s/--%s or --%s/--%s or --%s/--%s or --%s/--%s must be set", GHUserFlag, GHTokenFlag, GHAppIDFlag, GHAppKeyFileFlag, GHAppIDFlag, GHAppKeyFlag, GitlabUserFlag, GitlabTokenFlag, BitbucketUserFlag, BitbucketTokenFlag, ADUserFlag, ADTokenFlag)
expErr:="--gh-user/--gh-token or --gh-app-id/--gh-app-key-file or --gitlab-user/--gitlab-token or --bitbucket-user/--bitbucket-token or --azuredevops-user/--azuredevops-token must be set"
355
+
expErr:="--gh-user/--gh-token or --gh-app-id/--gh-app-key-file or --gh-app-id/--gh-app-key or --gitlab-user/--gitlab-token or --bitbucket-user/--bitbucket-token or --azuredevops-user/--azuredevops-token must be set"
Copy file name to clipboardExpand all lines: runatlantis.io/docs/access-credentials.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Available in Atlantis versions **newer** than 0.13.0.
45
45
- Create a file with the contents of the GitHub App Key, e.g. `atlantis-app-key.pem`
46
46
- Restart Atlantis with new flags: `atlantis server --gh-app-id <your id> --gh-app-key-file atlantis-app-key.pem --gh-webhook-secret <your secret> --write-git-creds --repo-allowlist 'github.com/your-org/*' --atlantis-url https://$ATLANTIS_HOST`.
47
47
48
-
NOTE: You can also create a config file instead of using flags. See [Server Configuration](/docs/server-configuration.html#config-file).
48
+
NOTE: Instead of using a file for the GitHub App Key you can also pass the key value directly using `--gh-app-key`. You can also create a config file instead of using flags. See [Server Configuration](/docs/server-configuration.html#config-file).
49
49
50
50
::: warning
51
51
Only a single installation per GitHub App is supported at the moment.
Copy file name to clipboardExpand all lines: runatlantis.io/docs/server-configuration.md
+10
Original file line number
Diff line number
Diff line change
@@ -342,6 +342,16 @@ Values are chosen in this order:
342
342
```
343
343
Path to a GitHub App PEM encoded private key file. If set, GitHub authentication will be performed as [an installation](https://developer.github.com/v3/apps/installations/).
344
344
345
+
-### `--gh-app-key`
346
+
```bash
347
+
atlantis server --gh-app-key="-----BEGIN RSA PRIVATE KEY-----(...)"
348
+
```
349
+
The PEM encoded private key for the GitHub App.
350
+
351
+
::: warning SECURITY WARNING
352
+
The contents of the private key will be visible by anyone that can run `ps` or look at the shell history of the machine where Atlantis is running. Use `--gh-app-key-file` to mitigate that risk.
353
+
:::
354
+
345
355
*### `--gitlab-hostname`
346
356
```bash
347
357
atlantis server --gitlab-hostname="my.gitlab.enterprise.com"
0 commit comments