How To Setup Git SSH Server To GPG Sign Git Push Requests?

526 views Asked by At

I am trying to setup my private git SSH server to accept GPG-signed push requests.

I have tried to follow Konstantin's instructions: https://people.kernel.org/monsieuricon/signed-git-pushes

On my server machine I configured the config file of the git repository on my server as Konstantin recommended:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = true

[receive]
        advertisePushOptions = true
        certNonceSeed = "<nonce seed here>"

[push]
        gpgSign = true

On my server and client machine I configured the following:

git config push.gpgSign

git config receive.certNonceSeed "<nonce seed here>"

I do the following commands on my client machine:

  1. git add -A

  2. git commit -S -m "Message here"

  3. git push origin main --signed --repo=ssh://url_of_server:/path/to/repo

But git prints the following error message:

fatal: the receiving end does not support --signed push

When I type git-receive-pack ../RaiderHacks/ on my server git prints the following:

git-receive-pack

I looked over documentation for git push using man git-push and man git-receive-pack and I am still confused.

I am simply trying to ensure I can GPG-sign my git push requests with the GPG private key I set using the user.signingkey config option

0

There are 0 answers