Git GPG Error Signature Tags

gotOK I'm a little new when it comes to Git. So I decided to read Pro Git by Scott Chacon. Great BTW book, highly recommend.

In any case, I got into the "Signed Tags" section. To sign a tag with GPG, you must have the secret key that I make installed. However, when I ran:

git tag -s v1.6 -m "my signed 1.6 tag" 

I got the following:

 C:\Users\Name\Desktop\git>git tag -s v1.6 -m "my signed 1.6 tag" gpg: error loading `iconv.dll': The specified module could not be found. gpg: please see http://www.gnupg.org/download/iconv.html for more information gpg: skipped "Name < name@gmail.com >": secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the data error: unable to sign the tag 

So, I did what the error message told me, and went to the link and followed the instructions. I copied iconv.dll to the folder with gpg.exe (\ Git \ bin). Run the command again and get:

 C:\Users\Name\Desktop\git>git tag -s v1.6 -m "my signed 1.6 tag" gpg: skipped "Name < name@gmail.com >": secret key not available gpg: signing failed: secret key not available error: gpg failed to sign the data error: unable to sign the tag 

EDIT:

When I try to list my private keys, I get this error.

 Name@NAME-PC ~ $ gpg --list-secret-keys gpg: keyblock resource `c:/Users/Name/.gnupg\secring.gpg': file open error gpg: keyblock resource `c:/Users/Name/.gnupg\pubring.gpg': file open error gpg: fatal: c:/Users/Name/.gnupg: directory does not exist! secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768 
+4
source share
1 answer

You can initialize the gnupg environment (secret key) using the gpg GUI, for example gpg4win , following this tutorial or the (more modern) official gpg4win documentation " Gpg4win for beginners ".

private key creation

Please note that this message adds the following caution:

I installed Gpg4win, which installs a beautiful GUI for key management and GPG command line interface.
My ignorance of this process was clear as I tried repeatedly to use the GUI (GNU Privacy Assistant - Key Manager) to create my key. This GUI seems to create valid keys, but wherever it stores the associated key-key files, not where the GPG command-line command expects to find them .

(Note: perhaps on C:\Users\Name\AppData\Roaming\gnupg , with the directory gnupg was named, not .gnupg )

Instead, be sure to use the command line client. Start with:

 gpg --gen-key 

If key creation fails, you may need to manually create the c:users<USER>.gnupg , which GPG does not seem to do on its own .

 cd C:\Users\Name mkdir .gnupg xcopy C:\Users\Name\AppData\Roaming\gnupg .gnupg 

The errors that I saw along the way were

 gpg: no writable public keyring found 

and

 signing failed: secret key not available 

Note: if your gnupg is in place, if you still have an error message, add the (gnupg) key-id that you want to use when signing the tag :

 git tag -u 'key-id' -s -m "some comment" some-tag 
+6
source

Source: https://habr.com/ru/post/1483976/


All Articles