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