所以今天我在我团队的 GitHub 存储库中添加了一条规则,即每个提交都必须具有有效签名。我安装了 GPG 来签署我的提交,但是当我将我的提交推送到 GitHub 存储库时,它一直说我绕过了该规则。但是当我添加标志
--signed
时,GitHub repo不接受它。这是我在没有--signed
的情况下推送时的输出:
C:\Users\Family\Parkour>git add .
C:\Users\Family\Parkour>git ci -S -m "firstcommit"
[main fefd3e6] firstcommit
6 files changed, 2 insertions(+), 856 deletions(-)
delete mode 100644 notshowingfiles
delete mode 100644 notshowingfiles
C:\Users\Family\Parkour>git push
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 4 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.39 KiB | 236.00 KiB/s, done.
Total 10 (delta 9), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (9/9), completed with 9 local objects.
remote: Bypassed rule violations for refs/heads/main:
remote:
remote: - Commits must have valid signatures.
remote:
To https://github.com/team/game.git
67ef523..fefd3e6 main -> main
这是我用
--signed
推送时的输出
C:\Users\Family\Parkour>git add .
warning: in the working copy of 'notshowingfiles', LF will be replaced by CRLF the next time Git touches it
C:\Users\TheUser\Parkour>git ci -S -m "secondcommit"
[main 946458c] secondcommit
9 files changed, 1695 insertions(+), 853 deletions(-)
create mode 100644 notshowingfiles
create mode 100644 notshowingfiles
C:\Users\TheUser\Parkour>git push --signed
fatal: the receiving end does not support --signed push
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'https://github.com/team/game.git'
(删除了一些东西)
GitHub不支持GPG,还是我哪里搞错了?