From 53f157179ad2a935342e4c77dac604aff9faf55a Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 16 Jun 2022 23:47:44 +0800 Subject: [PATCH] Remove legacy git code (ver < 2.0), fine tune markup tests (#19930) * clean git support for ver < 2.0 * fine tune tests for markup (which requires git module) * remove unnecessary comments * try to fix tests * try test again * use const for GitVersionRequired instead of var * try to fix integration test * Refactor CheckAttributeReader to make a *git.Repository version * update document for commit signing with Gitea's internal gitconfig * update document for commit signing with Gitea's internal gitconfig Co-authored-by: Andrew Thornton Co-authored-by: Lunny Xiao --- doc/advanced/signing.en-us.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/advanced/signing.en-us.md b/doc/advanced/signing.en-us.md index aaaeb710..8ae2f94e 100644 --- a/doc/advanced/signing.en-us.md +++ b/doc/advanced/signing.en-us.md @@ -83,8 +83,7 @@ The first option to discuss is the `SIGNING_KEY`. There are three main options: - `none` - this prevents Gitea from signing any commits -- `default` - Gitea will default to the key configured within - `git config` +- `default` - Gitea will default to the key configured within `git config` - `KEYID` - Gitea will sign commits with the gpg key with the ID `KEYID`. In this case you should provide a `SIGNING_NAME` and `SIGNING_EMAIL` to be displayed for this key. @@ -98,6 +97,12 @@ repositories, `SIGNING_KEY=default` could be used to provide different signing keys on a per-repository basis. However, this is clearly not an ideal UI and therefore subject to change. +**Since 1.17**, Gitea runs git in its own home directory `[repository].ROOT` and uses its own config `{[repository].ROOT}/.gitconfig`. +If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/gitconfig`) +or the Gitea internal git config `{[repository].ROOT}/.gitconfig`. +Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[repository].ROOT`. + + ### `INITIAL_COMMIT` This option determines whether Gitea should sign the initial commit @@ -118,7 +123,7 @@ The possible values are: - `never`: Never sign - `pubkey`: Only sign if the user has a public key -- `twofa`: Only sign if the user logs in with two factor authentication +- `twofa`: Only sign if the user logs in with two-factor authentication - `parentsigned`: Only sign if the parent commit is signed. - `always`: Always sign @@ -132,7 +137,7 @@ editor or API CRUD actions. The possible values are: - `never`: Never sign - `pubkey`: Only sign if the user has a public key -- `twofa`: Only sign if the user logs in with two factor authentication +- `twofa`: Only sign if the user logs in with two-factor authentication - `parentsigned`: Only sign if the parent commit is signed. - `always`: Always sign @@ -146,7 +151,7 @@ The possible options are: - `never`: Never sign - `pubkey`: Only sign if the user has a public key -- `twofa`: Only sign if the user logs in with two factor authentication +- `twofa`: Only sign if the user logs in with two-factor authentication - `basesigned`: Only sign if the parent commit in the base repo is signed. - `headsigned`: Only sign if the head commit in the head branch is signed. - `commitssigned`: Only sign if all the commits in the head branch to the merge point are signed.