prydonius / karn

Manage multiple Git identities
MIT License
304 stars 7 forks source link

"Couldn't retrieve identity from Git repository." if no global signing key is set. #31

Open seltzered opened 2 years ago

seltzered commented 2 years ago

repo.go in https://github.com/prydonius/karn/pull/25 (implement gpg signing) added a getconfig for a signingkey (see repo.go diff). This causes a "Couldn't retrieve identity from Git repository" issue if a user hasn't setup a signingkey at all in their global ~/.gitconfig.

Suggest making this a soft-check, possibly not just for signingkey but for all global gitconfig identity attributes if the intent of karn is to not depend on any global identity aspects.

Workaround for now is to set a global signing key in ~/.gitconfig before using karn.

prydonius commented 2 years ago

Good catch, it shouldn't error on this. Should be a quick patch, @seltzered let me know if you want to submit a fix!

sidx1024 commented 1 year ago

I'm getting the same issue when name and email are not set in ~/.gitconfig