-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
gitext-rs/git2-ext
#27Labels
bugNot as expectedNot as expected
Description
Please complete the following tasks
- I have searched the discussions
- I have searched the existing issues
Description
Git-stack picks up the first GPG key to sign commits.
I have a set of GPG keys set up in the following order (gpg --list-secret-keys --keyid-format LONG
):
old-work@email.com
(an email left from the previous job, not mentioned in any git configs or env vars)private@email.com
work@email.com
Whenever I run git sync
, it always tries to sign commits with the first key from the list (i.e. old-work@email.com
).
Version
0.10.10
Steps to reproduce
- Run
gpg --full-generate-key
multiple times to create a couple of GPG keys. To make testing easier, I recommend setting different passphrases for them.email1@email.com
email2@email.com
email3@email.com
- Set git email to
email2@email.com
:git config --global user.email "email2@email.com"
- Force git to sign all commits:
git config --global commit.gpgSign true
- Set env variables to
email3@email.com
:export GIT_AUTHOR_EMAIL=email3@email.com
export GIT_COMMITTER_EMAIL=email3@email.com
- Run
git sync
in any repo that will require rebasing and resigning commits
Actual Behaviour
Git-sync signs commits with email1@email.com
key
Expected Behaviour
Git-sync should pick up a key in the following priority:
GIT_COMMITTER_EMAIL
~/.config/git/config
~/.gitconfig
Debug Output
No response
Metadata
Metadata
Assignees
Labels
bugNot as expectedNot as expected