How to choose which key to sign git push with?

Git push can be signed using

git push --signed 

Can I indicate with which gpg key to sign push? The git push manifest does not indicate anything and is looking at the configuration options, it seems that

 user.signingkey 

specify a signature key for signed commits.

+6
source share
1 answer

There is no easy solution to switch, unfortunately ...

But maybe you will be pleased to create an alias for signed commits, for example:

 $ git config --global alias.ptest '!git config user.signingkey KEY && git push --signed' $ git config --global alias.pdev '!git config user.signingkey KEY2 && git push --signed' 

Arguments should be passed push without any problems.

0
source

All Articles