gotOK 当谈到 Git 时,我还是个新手。所以我决定阅读 Scott Chacon 的 Pro Git。BTW 好书,强烈推荐。
无论如何到了关于签名标签的部分。要使用 GPG 签署标签,您必须设置一个私钥,就像我做的那样。但是,当我运行时:
git tag -s v1.6 -m "my signed 1.6 tag"
我得到以下信息:
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
所以,我按照错误消息告诉我的去做,然后转到链接并按照说明进行操作。我将 iconv.dll 复制到包含 gpg.exe (\Git\bin) 的文件夹中。再次运行命令并得到:
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
编辑:
当我尝试列出我的密钥时,我得到了这个错误???
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