ublue-os / fleek

[deprecated] Own your $HOME
https://getfleek.dev
Apache License 2.0
831 stars 27 forks source link

user.signingKey in git config set to SSH key path rather than a GPG key ID #326

Closed grdryn closed 1 year ago

grdryn commented 1 year ago

Describe the bug user.ssh_private_key_file property is used to populate the Git config's user.signingKey field, when that should be a GPG key rather than an SSH key.

The Git docs for this config property only mention using a GPG key, not an SSH key.

Is an SSH key path a valid value for this?

To Reproduce

  1. Set ssh_private_key_file: ~/.ssh/id_rsa for a user in the fleek config
  2. fleek apply
  3. cat .config/git/config and see that user.signingKey is set to that value

Expected behavior I might be misunderstanding or missing how an SSH key path is a valid value for this Git config property. If not, then the behaviour I'd expect is that a GPG key ID is used for this rather than a path to an SSH key on disk.

Environment

grdryn commented 1 year ago

TIL, it seems I was wrong and you actually can sign with an SSH key since version 2.34! I'll close this issue as it doesn't make sense now.

brcha commented 8 months ago

Just add to programs.git in user.nix the following:

signing = {
        key = lib.mkForce "your gpg key id";
        signByDefault = lib.mkForce true;
};
extraConfig = {
        gpg.format = lib.mkForce "openpgp";
};

and add lib to imports at the beginning of the file, of course.