Unlike most other keys, the default key is encoded using the name default in the file system, but inside the key name is empty. If one actually stores the key name default inside, the key is rejected by validate_key_name.
If one does git-crypt add-gpg-user without -k, the default key is being used leaving the key name empty and things work. If one specifies -k default however, it actually stores the invalid key name default. The resulting key file is always rejected by validate_key_name.
This commit changes the behaviour of -k default to behave as if no -k were given.
It is not entirely clear to me whether this change would have prevented #230.
Unlike most other keys, the default key is encoded using the name
default
in the file system, but inside the key name is empty. If one actually stores the key namedefault
inside, the key is rejected byvalidate_key_name
.If one does
git-crypt add-gpg-user
without-k
, the default key is being used leaving the key name empty and things work. If one specifies-k default
however, it actually stores the invalid key namedefault
. The resulting key file is always rejected byvalidate_key_name
.This commit changes the behaviour of
-k default
to behave as if no-k
were given.It is not entirely clear to me whether this change would have prevented #230.