]> Nutra Git (v1) - gamesguru/git-remote-gcrypt.git/commitdiff
Obey git config user.signingkey
authorroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
committerroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
README.rst
git-remote-gcrypt

index b1530266a003abdec5ae6104af07ea974ec841fe..4ffb519945a524f030abeb4899362209086ccb98 100644 (file)
@@ -52,14 +52,16 @@ Configuration
     gpg --export KEYID1 > <path-to-keyring>
     git config gcrypt.keyring <path-to-keyring>
 
-  .. NOTE:: The user's gnupg configuration for encryption algorithms are used.
-            Check your keys and preferences, see `man gpg`.
+  .. NOTE:: GnuPG's configuration applies. Check your key and general
+            preferences, see `man gpg`.
 
 + All readers of the repository must have their pubkey included in
   the keyring used when pushing. All writers must have the complete
   set of pubkeys available. You can commit the keyring to the repo,
   further key management features do not yet exist.
 
++ gcrypt obeys `user.signingkey`
+
 
 Repository Format
 -----------------
index db4767304efa4925fd4e83f2e63276622fb80add..14a2fe811481daf5f3c246f353765130cd0582b4 100755 (executable)
@@ -184,6 +184,16 @@ CLEAN_FINAL()
        isurl gitception "$1" && git update-ref -d "$Gref" || :
 }
 
+addsignkeyparam()
+{
+       if isnull "$Conf_signkey"; then
+               "$@"
+       else
+               "$@" -u "$Conf_signkey"
+       fi
+}
+
+
 ENCRYPT()
 {
        gpg --batch --force-mdc --compress-algo none --passphrase-fd 3 -c 3<<EOF
@@ -202,7 +212,7 @@ EOF
 # Encrypt to recipients $1
 PRIVENCRYPT()
 {
-       gpg --no-default-keyring --keyring "$Conf_keyring" \
+       addsignkeyparam gpg --no-default-keyring --keyring "$Conf_keyring" \
                --compress-algo none -se $1
 }
 
@@ -282,6 +292,7 @@ make_new_repo()
 read_config()
 {
        Conf_keyring=$(git config --path gcrypt.keyring || xecho "/dev/null")
+       Conf_signkey=$(git config --path user.signingkey || :)
 }
 
 ensure_connected()