|
@@ -2,7 +2,9 @@ Configure real git user
|
2
|
2
|
=======================
|
3
|
3
|
|
4
|
4
|
!!DO NOT USE BUILT-IN SSH SERVER!!
|
5
|
|
-``` app.ini
|
|
5
|
+
|
|
6
|
+app.ini:
|
|
7
|
+```
|
6
|
8
|
[server]
|
7
|
9
|
DISABLE_SSH = false
|
8
|
10
|
SSH_PORT = 22
|
|
@@ -10,7 +12,7 @@ START_SSH_SERVER = false
|
10
|
12
|
```
|
11
|
13
|
|
12
|
14
|
Create user and SSH key:
|
13
|
|
-``` shell
|
|
15
|
+```
|
14
|
16
|
. ./env
|
15
|
17
|
groupadd -g "${PUID}" git
|
16
|
18
|
useradd -g git -u "${PGID}" git -d "$(pwd)"/data/gogs/git
|
|
@@ -19,7 +21,8 @@ echo -n 'no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ' | sud
|
19
|
21
|
```
|
20
|
22
|
|
21
|
23
|
|
22
|
|
-``` /app/gogs/gogs (chmod +x)
|
|
24
|
+/app/gogs/gogs: (chmod +x)
|
|
25
|
+```
|
23
|
26
|
#!/bin/sh
|
24
|
27
|
ssh -p 35021 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
25
|
28
|
```
|