Skip to content

Clarify gpg.ssh.allowedSignersFile for ssh key signing #34387

Closed as not planned
Closed as not planned
@nguyenvulong

Description

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key?platform=linux#telling-git-about-your-ssh-key

What part(s) of the article would you like to see updated?

Telling Git about your SSH key

I believe it should mention adding

gpg.ssh.allowedsignersfile=/path/to/.config/git/allowed_signers

Otherwise, git would complain that

error: gpg.ssh.allowedSignersFile needs to be configured and exist for ssh signature verification

And in case rules were set, in a project settings > rules > rulesets, github will refuse push

Require signed commits
Commits pushed to matching refs must have verified signatures.
remote: - Commits must have verified signatures.
remote:   Found 1 violation:
remote:
remote:   bd96ff44bfa007357c164fb564b3fdd781b31322
remote:
To github.com:just/a-repo.git
 ! [remote rejected] main -> main (push declined due to repository rule violations)
error: failed to push some refs to 'github.com:just/a-repo.git'

Additional information

Related issue #28577

Metadata

Assignees

No one assigned

    Labels

    SME reviewedAn SME has reviewed this issue/PRauthenticationContent relating to authenticationcontentThis issue or pull request belongs to the Docs Content teammore-information-neededMore information is needed to complete reviewstaleThere is no recent activity on this issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions