Skip to content

GPG key support #1

@woalk

Description

@woalk

Implement support of GPG key switching based on identity.

GPG keys are also part of an identity and one may not want to commit with the wrong or without GPG key if you have a key for your identity.

  • The key should be optional when calling git identities add <id> <name> <email> [<gpg-id>]
  • The key should be changeable with git identities update --key <gpg-id>
  • The key should be checked when searching for the currently selected identity (most importantly in checks.py):
    • If no key is set, but name and email match an identity with a key (and the same identity does not exist with a key as well), it should be shown as an error and not be committable. It should be shown as a warning in list and show (e.g. mark the selected identity with an exclamation mark instead of an askerisk).
    • If a key is set, but name and email match an identity without key (and the same identity doesn't exist without key), it should also be treated that way.
  • When changing from an identity with a key to an identity without key, the selected key config should be removed.

There's room for discussion on what to check for correct key use.
Suggest commit -S aliases, switch git log aliases to automatically include GPG information based on the repo context, etc.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions