From 285a5e19c106ce8e1d2d2ceb59ad20d268329191 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 15 May 2023 14:41:25 +0800 Subject: [PATCH 1/5] fix: use comment --- docs/content/doc/installation/from-binary.en-us.md | 2 +- docs/content/doc/installation/from-binary.zh-cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index c7824c3480254..388986bc347b0 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -83,7 +83,7 @@ Create a user to run Gitea (e.g. `git`) adduser \ --system \ --shell /bin/bash \ - --gecos 'Git Version Control' \ + --comment 'Git Version Control' \ --group \ --disabled-password \ --home /home/git \ diff --git a/docs/content/doc/installation/from-binary.zh-cn.md b/docs/content/doc/installation/from-binary.zh-cn.md index abe799dc94b7a..94693ba9639c8 100644 --- a/docs/content/doc/installation/from-binary.zh-cn.md +++ b/docs/content/doc/installation/from-binary.zh-cn.md @@ -77,7 +77,7 @@ git --version adduser \ --system \ --shell /bin/bash \ - --gecos 'Git Version Control' \ + --comment 'Git Version Control' \ --group \ --disabled-password \ --home /home/git \ From ece4987ebbfdd0bd29548e0eae14de48f1e7dd7c Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 15 May 2023 14:52:47 +0800 Subject: [PATCH 2/5] fix: use gid --- docs/content/doc/installation/from-binary.en-us.md | 3 ++- docs/content/doc/installation/from-binary.zh-cn.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index 388986bc347b0..e930a693c99e1 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -80,11 +80,12 @@ git --version Create a user to run Gitea (e.g. `git`) ```sh +groupadd git adduser \ --system \ --shell /bin/bash \ --comment 'Git Version Control' \ - --group \ + --gid git \ --disabled-password \ --home /home/git \ git diff --git a/docs/content/doc/installation/from-binary.zh-cn.md b/docs/content/doc/installation/from-binary.zh-cn.md index 94693ba9639c8..ee6eb434403fb 100644 --- a/docs/content/doc/installation/from-binary.zh-cn.md +++ b/docs/content/doc/installation/from-binary.zh-cn.md @@ -74,11 +74,12 @@ git --version 创建用户(推荐使用名称 `git`) ```sh +groupadd git adduser \ --system \ --shell /bin/bash \ --comment 'Git Version Control' \ - --group \ + --gid git \ --disabled-password \ --home /home/git \ git From e202afd16fa96b3841e738fe1ef25c791f77408d Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 15 May 2023 15:24:46 +0800 Subject: [PATCH 3/5] chore: mutilple ways --- docs/content/doc/installation/from-binary.en-us.md | 12 +++++++++++- docs/content/doc/installation/from-binary.zh-cn.md | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index e930a693c99e1..2e0cf189885a5 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -80,13 +80,23 @@ git --version Create a user to run Gitea (e.g. `git`) ```sh +# On Ubuntu/Debian: +adduser \ + --system \ + --shell /bin/bash \ + --gecos 'Git Version Control' \ + --group \ + --disabled-password \ + --home /home/git \ + git + +# On Fedora/RHEL/CentOS: groupadd git adduser \ --system \ --shell /bin/bash \ --comment 'Git Version Control' \ --gid git \ - --disabled-password \ --home /home/git \ git ``` diff --git a/docs/content/doc/installation/from-binary.zh-cn.md b/docs/content/doc/installation/from-binary.zh-cn.md index ee6eb434403fb..f51eefea826cc 100644 --- a/docs/content/doc/installation/from-binary.zh-cn.md +++ b/docs/content/doc/installation/from-binary.zh-cn.md @@ -74,13 +74,23 @@ git --version 创建用户(推荐使用名称 `git`) ```sh +# On Ubuntu/Debian: +adduser \ + --system \ + --shell /bin/bash \ + --gecos 'Git Version Control' \ + --group \ + --disabled-password \ + --home /home/git \ + git + +# On Fedora/RHEL/CentOS: groupadd git adduser \ --system \ --shell /bin/bash \ --comment 'Git Version Control' \ --gid git \ - --disabled-password \ --home /home/git \ git ``` From 5c9e926a48c55ca65a36a1e0e325d1c87f990fef Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 15 May 2023 15:27:21 +0800 Subject: [PATCH 4/5] fix: system --- docs/content/doc/installation/from-binary.en-us.md | 2 +- docs/content/doc/installation/from-binary.zh-cn.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index 2e0cf189885a5..f03be5d745e9d 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -91,7 +91,7 @@ adduser \ git # On Fedora/RHEL/CentOS: -groupadd git +groupadd --system git adduser \ --system \ --shell /bin/bash \ diff --git a/docs/content/doc/installation/from-binary.zh-cn.md b/docs/content/doc/installation/from-binary.zh-cn.md index f51eefea826cc..c5a63b4b0c016 100644 --- a/docs/content/doc/installation/from-binary.zh-cn.md +++ b/docs/content/doc/installation/from-binary.zh-cn.md @@ -85,7 +85,7 @@ adduser \ git # On Fedora/RHEL/CentOS: -groupadd git +groupadd --system git adduser \ --system \ --shell /bin/bash \ From 5c749e7db1948d7714fd3db293a2242485ef7bc5 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 15 May 2023 18:12:40 +0800 Subject: [PATCH 5/5] fix: home dir --- docs/content/doc/installation/from-binary.en-us.md | 3 ++- docs/content/doc/installation/from-binary.zh-cn.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index f03be5d745e9d..5c8973fa941f4 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -97,7 +97,8 @@ adduser \ --shell /bin/bash \ --comment 'Git Version Control' \ --gid git \ - --home /home/git \ + --home-dir /home/git \ + --create-home \ git ``` diff --git a/docs/content/doc/installation/from-binary.zh-cn.md b/docs/content/doc/installation/from-binary.zh-cn.md index c5a63b4b0c016..248f03d63fe9f 100644 --- a/docs/content/doc/installation/from-binary.zh-cn.md +++ b/docs/content/doc/installation/from-binary.zh-cn.md @@ -91,7 +91,8 @@ adduser \ --shell /bin/bash \ --comment 'Git Version Control' \ --gid git \ - --home /home/git \ + --home-dir /home/git \ + --create-home \ git ```