mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +00:00
Improve the signing documentations (#108)
Reviewed-on: https://gitea.com/gitea/docs/pulls/108
This commit is contained in:
@@ -19,11 +19,10 @@ A commit will be marked with a grey unlocked icon if no key can be
|
|||||||
found to verify it. If a commit is marked with a red unlocked icon,
|
found to verify it. If a commit is marked with a red unlocked icon,
|
||||||
it is reported to be signed with a key with an id.
|
it is reported to be signed with a key with an id.
|
||||||
|
|
||||||
Please note: The signer of a commit does not have to be an author or
|
:::note
|
||||||
|
The signer of a commit does not have to be an author or
|
||||||
committer of a commit.
|
committer of a commit.
|
||||||
|
:::
|
||||||
This functionality requires Git >= 1.7.9 but for full functionality
|
|
||||||
this requires Git >= 2.0.0.
|
|
||||||
|
|
||||||
## Automatic Signing
|
## Automatic Signing
|
||||||
|
|
||||||
@@ -81,17 +80,22 @@ The `default` option will interrogate `git config` for
|
|||||||
`commit.gpgsign` option - if this is set, then it will use the results
|
`commit.gpgsign` option - if this is set, then it will use the results
|
||||||
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
||||||
|
|
||||||
Please note: by adjusting Git's `config` file within Gitea's
|
By adjusting Git's `config` file within Gitea's
|
||||||
repositories, `SIGNING_KEY=default` could be used to provide different
|
repositories, `SIGNING_KEY=default` could be used to provide different
|
||||||
signing keys on a per-repository basis. However, this is clearly not an
|
signing keys on a per-repository basis. However, this is clearly not an
|
||||||
ideal UI and therefore subject to change.
|
ideal UI and therefore subject to change.
|
||||||
|
|
||||||
|
:::warning
|
||||||
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
||||||
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/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 `{[git].HOME_PATH}/.gitconfig`.
|
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
||||||
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location.
|
|
||||||
|
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location, otherwise Gitea will use the gpg keys only under `{[git].HOME_PATH}/.gnupg`.
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -61,12 +61,16 @@ MERGES = pubkey, twofa, basesigned, commitssigned
|
|||||||
|
|
||||||
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
||||||
|
|
||||||
请注意:通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
||||||
|
|
||||||
|
:::warning
|
||||||
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
||||||
|
|
||||||
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
||||||
|
|
||||||
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
||||||
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。
|
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置,否则Gitea将会从 `{[git].HOME_PATH}/.gnupg` 查找私钥。
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -61,12 +61,16 @@ MERGES = pubkey, twofa, basesigned, commitssigned
|
|||||||
|
|
||||||
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
||||||
|
|
||||||
请注意:通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
||||||
|
|
||||||
|
:::warning
|
||||||
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
||||||
|
|
||||||
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
||||||
|
|
||||||
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
||||||
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。
|
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。,否则Gitea将会从 `{[git].HOME_PATH}/.gnupg` 查找私钥。
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
---
|
---
|
||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
|
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
sidebar_position: 50
|
sidebar_position: 50
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
- /zh-cn/signing
|
- /zh-cn/signing
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# GPG 提交签名
|
# GPG 提交签名
|
||||||
@@ -64,12 +61,16 @@ MERGES = pubkey, twofa, basesigned, commitssigned
|
|||||||
|
|
||||||
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
||||||
|
|
||||||
请注意:通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
||||||
|
|
||||||
|
:::warning
|
||||||
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
||||||
|
|
||||||
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
||||||
|
|
||||||
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
||||||
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。
|
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。,否则Gitea将会从 `{[git].HOME_PATH}/.gnupg` 查找私钥。
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
---
|
---
|
||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
|
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
sidebar_position: 50
|
sidebar_position: 50
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
- /zh-cn/signing
|
- /zh-cn/signing
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# GPG 提交签名
|
# GPG 提交签名
|
||||||
@@ -64,12 +61,16 @@ MERGES = pubkey, twofa, basesigned, commitssigned
|
|||||||
|
|
||||||
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
||||||
|
|
||||||
请注意:通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
||||||
|
|
||||||
|
:::warning
|
||||||
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
||||||
|
|
||||||
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
||||||
|
|
||||||
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
||||||
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。
|
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。,否则Gitea将会从 `{[git].HOME_PATH}/.gnupg` 查找私钥。
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
---
|
---
|
||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
|
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
sidebar_position: 50
|
sidebar_position: 50
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
- /zh-cn/signing
|
- /zh-cn/signing
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# GPG 提交签名
|
# GPG 提交签名
|
||||||
@@ -64,12 +61,16 @@ MERGES = pubkey, twofa, basesigned, commitssigned
|
|||||||
|
|
||||||
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
`default` 选项将读取 `git config` 中的 `commit.gpgsign` 选项 - 如果设置了该选项,它将使用 `user.signingkey`、`user.name` 和 `user.email` 的结果。
|
||||||
|
|
||||||
请注意:通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
通过在 Gitea 的仓库中调整 Git 的 `config` 文件,可以使用 `SIGNING_KEY=default` 为每个仓库提供不同的签名密钥。然而,这显然不是一个理想的用户界面,因此可能会发生更改。
|
||||||
|
|
||||||
|
:::warning
|
||||||
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
**自 1.17 起**,Gitea 在自己的主目录 `[git].HOME_PATH`(默认为 `%(APP_DATA_PATH)/home`)中运行 git,并使用自己的配置文件 `{[git].HOME_PATH}/.gitconfig`。
|
||||||
|
|
||||||
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
如果您有自己定制的 Gitea git 配置,您应该将这些配置设置在系统 git 配置文件中(例如 `/etc/gitconfig`)或者 Gitea 的内部 git 配置文件 `{[git].HOME_PATH}/.gitconfig` 中。
|
||||||
|
|
||||||
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
与 git 命令相关的主目录文件(如 `.gnupg`)也应该放在 Gitea 的 git 主目录 `[git].HOME_PATH` 中。
|
||||||
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。
|
如果您希望将 `.gnupg` 目录放在 `{[git].HOME_PATH}/` 之外的位置,请考虑设置 `$GNUPGHOME` 环境变量为您首选的位置。,否则Gitea将会从 `{[git].HOME_PATH}/.gnupg` 查找私钥。
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -79,17 +79,22 @@ The `default` option will interrogate `git config` for
|
|||||||
`commit.gpgsign` option - if this is set, then it will use the results
|
`commit.gpgsign` option - if this is set, then it will use the results
|
||||||
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
||||||
|
|
||||||
Please note: by adjusting Git's `config` file within Gitea's
|
By adjusting Git's `config` file within Gitea's
|
||||||
repositories, `SIGNING_KEY=default` could be used to provide different
|
repositories, `SIGNING_KEY=default` could be used to provide different
|
||||||
signing keys on a per-repository basis. However, this is clearly not an
|
signing keys on a per-repository basis. However, this is clearly not an
|
||||||
ideal UI and therefore subject to change.
|
ideal UI and therefore subject to change.
|
||||||
|
|
||||||
|
:::warning
|
||||||
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
||||||
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/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 `{[git].HOME_PATH}/.gitconfig`.
|
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
||||||
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location.
|
|
||||||
|
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location, otherwise Gitea will use the gpg keys only under `{[git].HOME_PATH}/.gnupg`.
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
---
|
---
|
||||||
date: "2019-08-17T10:20:00+01:00"
|
date: "2019-08-17T10:20:00+01:00"
|
||||||
|
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
sidebar_position: 50
|
sidebar_position: 50
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
- /en-us/signing
|
- /en-us/signing
|
||||||
---
|
---
|
||||||
@@ -88,12 +86,22 @@ repositories, `SIGNING_KEY=default` could be used to provide different
|
|||||||
signing keys on a per-repository basis. However, this is clearly not an
|
signing keys on a per-repository basis. However, this is clearly not an
|
||||||
ideal UI and therefore subject to change.
|
ideal UI and therefore subject to change.
|
||||||
|
|
||||||
|
By adjusting Git's `config` file within Gitea's
|
||||||
|
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.
|
||||||
|
|
||||||
|
:::warning
|
||||||
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
||||||
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/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 `{[git].HOME_PATH}/.gitconfig`.
|
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
||||||
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location.
|
|
||||||
|
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location, otherwise Gitea will use the gpg keys only under `{[git].HOME_PATH}/.gnupg`.
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
---
|
---
|
||||||
date: "2019-08-17T10:20:00+01:00"
|
date: "2019-08-17T10:20:00+01:00"
|
||||||
|
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
sidebar_position: 50
|
sidebar_position: 50
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
- /en-us/signing
|
- /en-us/signing
|
||||||
---
|
---
|
||||||
@@ -83,17 +81,22 @@ The `default` option will interrogate `git config` for
|
|||||||
`commit.gpgsign` option - if this is set, then it will use the results
|
`commit.gpgsign` option - if this is set, then it will use the results
|
||||||
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
||||||
|
|
||||||
Please note: by adjusting Git's `config` file within Gitea's
|
By adjusting Git's `config` file within Gitea's
|
||||||
repositories, `SIGNING_KEY=default` could be used to provide different
|
repositories, `SIGNING_KEY=default` could be used to provide different
|
||||||
signing keys on a per-repository basis. However, this is clearly not an
|
signing keys on a per-repository basis. However, this is clearly not an
|
||||||
ideal UI and therefore subject to change.
|
ideal UI and therefore subject to change.
|
||||||
|
|
||||||
|
:::warning
|
||||||
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
||||||
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/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 `{[git].HOME_PATH}/.gitconfig`.
|
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
||||||
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location.
|
|
||||||
|
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location, otherwise Gitea will use the gpg keys only under `{[git].HOME_PATH}/.gnupg`.
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
---
|
---
|
||||||
date: "2019-08-17T10:20:00+01:00"
|
date: "2019-08-17T10:20:00+01:00"
|
||||||
|
|
||||||
slug: "signing"
|
slug: "signing"
|
||||||
sidebar_position: 50
|
sidebar_position: 50
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
- /en-us/signing
|
- /en-us/signing
|
||||||
---
|
---
|
||||||
@@ -21,11 +19,10 @@ A commit will be marked with a grey unlocked icon if no key can be
|
|||||||
found to verify it. If a commit is marked with a red unlocked icon,
|
found to verify it. If a commit is marked with a red unlocked icon,
|
||||||
it is reported to be signed with a key with an id.
|
it is reported to be signed with a key with an id.
|
||||||
|
|
||||||
Please note: The signer of a commit does not have to be an author or
|
:::note
|
||||||
|
The signer of a commit does not have to be an author or
|
||||||
committer of a commit.
|
committer of a commit.
|
||||||
|
:::
|
||||||
This functionality requires Git >= 1.7.9 but for full functionality
|
|
||||||
this requires Git >= 2.0.0.
|
|
||||||
|
|
||||||
## Automatic Signing
|
## Automatic Signing
|
||||||
|
|
||||||
@@ -83,17 +80,22 @@ The `default` option will interrogate `git config` for
|
|||||||
`commit.gpgsign` option - if this is set, then it will use the results
|
`commit.gpgsign` option - if this is set, then it will use the results
|
||||||
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
of the `user.signingkey`, `user.name` and `user.email` as appropriate.
|
||||||
|
|
||||||
Please note: by adjusting Git's `config` file within Gitea's
|
By adjusting Git's `config` file within Gitea's
|
||||||
repositories, `SIGNING_KEY=default` could be used to provide different
|
repositories, `SIGNING_KEY=default` could be used to provide different
|
||||||
signing keys on a per-repository basis. However, this is clearly not an
|
signing keys on a per-repository basis. However, this is clearly not an
|
||||||
ideal UI and therefore subject to change.
|
ideal UI and therefore subject to change.
|
||||||
|
|
||||||
|
:::warning
|
||||||
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
**Since 1.17**, Gitea runs git in its own home directory `[git].HOME_PATH` (default to `%(APP_DATA_PATH)/home`)
|
||||||
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
and uses its own config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
If you have your own customized git config for Gitea, you should set these configs in system git config (aka `/etc/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 `{[git].HOME_PATH}/.gitconfig`.
|
or the Gitea internal git config `{[git].HOME_PATH}/.gitconfig`.
|
||||||
|
|
||||||
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
Related home files for git command (like `.gnupg`) should also be put in Gitea's git home directory `[git].HOME_PATH`.
|
||||||
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location.
|
|
||||||
|
If you like to keep the `.gnupg` directory outside of `{[git].HOME_PATH}/`, consider setting the `$GNUPGHOME` environment variable to your preferred location, otherwise Gitea will use the gpg keys only under `{[git].HOME_PATH}/.gnupg`.
|
||||||
|
:::
|
||||||
|
|
||||||
### `INITIAL_COMMIT`
|
### `INITIAL_COMMIT`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user