summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2018-11-01 13:41:07 +0000
committertechknowlogick <hello@techknowlogick.com>2018-11-01 09:41:07 -0400
commit7d9a191a3c78f7135e7ce3e314290e844fb7edfe (patch)
treee264b613f327b49d29054fa2cc1cf0f0a16ac9ad /docs
parent00533d38702767bc25703968daaa87b30980d2c9 (diff)
downloadgitea-7d9a191a3c78f7135e7ce3e314290e844fb7edfe.tar.gz
gitea-7d9a191a3c78f7135e7ce3e314290e844fb7edfe.zip
Create AuthorizedKeysCommand (#5236)
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/usage/command-line.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/content/doc/usage/command-line.md b/docs/content/doc/usage/command-line.md
index 90e1ae2514..904a395e8c 100644
--- a/docs/content/doc/usage/command-line.md
+++ b/docs/content/doc/usage/command-line.md
@@ -163,3 +163,24 @@ for automatic deployments.
- `gitea generate secret INTERNAL_TOKEN`
- `gitea generate secret LFS_JWT_SECRET`
- `gitea generate secret SECRET_KEY`
+
+#### keys
+
+Provides an SSHD AuthorizedKeysCommand. Needs to be configured in the sshd config file:
+
+```ini
+...
+# The value of -e and the AuthorizedKeysCommandUser should match the
+# username running gitea
+AuthorizedKeysCommandUser git
+AuthorizedKeysCommand /path/to/gitea keys -e git -u %u -t %t -k %k
+```
+
+The command will return the appropriate authorized_keys line for the
+provided key. You should also set the value
+`SSH_CREATE_AUTHORIZED_KEYS_FILE=false` in the `[server]` section of
+`app.ini`.
+
+NB: opensshd requires the gitea program to be owned by root and not
+writable by group or others. The program must be specified by an absolute
+path.