diff options
author | Andy Parkins <andyparkins@gmail.com> | 2007-01-26 17:13:46 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-28 00:46:59 +0300 |
commit | d67778eccdf778f0fc252aaade8a47c23bfebbd6 (patch) | |
tree | f05502ba3cffa2a3c0d630a1739f0c6667be9d11 /Documentation/git-tag.txt | |
parent | f127404c45eff139037834a6464b68fbe1798e16 (diff) |
Allow the tag signing key to be specified in the config file
I did this:
$ git tag -s test-sign
gpg: skipped "Andy Parkins <andyparkins@gmail.com>": secret key not available
gpg: signing failed: secret key not available
failed to sign the tag with GPG.
The problem is that I have used the comment field in my key's UID
definition.
$ gpg --list-keys andy
pub 1024D/4F712F6D 2003-08-14
uid Andy Parkins (Google) <andyparkins@gmail.com>
So when git-tag looks for "Andy Parkins <andyparkins@gmail.com>";
obviously it's not going to be found.
There shouldn't be a requirement that I use the same form of my name in
my git repository and my gpg key - I might want to be formal (Andrew) in
my gpg key and informal (Andy) in the repository. Further I might have
multiple keys in my keyring, and might want to use one that doesn't
match up with the address I use in commit messages.
This patch adds a configuration entry "user.signingkey" which, if
present, will be passed to the "-u" switch for gpg, allowing the tag
signing key to be overridden. If the entry is not present, the fallback
is the original method, which means existing behaviour will continue
untouched.
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/git-tag.txt')
-rw-r--r-- | Documentation/git-tag.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 13c7aefbf3..3f01e0bfc5 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -70,6 +70,16 @@ OPTIONS Take the tag message from the given file. Use '-' to read the message from the standard input. +CONFIGURATION +------------- +By default, git-tag in sign-with-default mode (-s) will use your +committer identity (of the form "Your Name <your@email.address>") to +find a key. If you want to use a different default key, you can specify +it in the repository configuration as follows: + +[user] + signingkey = <gpg-key-id> + Author ------ Written by Linus Torvalds <torvalds@osdl.org>, |