1 使用png签名tag时报错“

jb@39:~/11$ git tag -s gpg -m "gpg"
gpg: directory `/home/jb/.gnupg' created
gpg: new configuration file `/home/jb/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/jb/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/jb/.gnupg/secring.gpg' created
gpg: keyring `/home/jb/.gnupg/pubring.gpg' created
gpg: skipped "vipzrx <vipzrx@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

解决方法:

创建trustdb.gpg

$ gpg --list-key
gpg: /home/jb/.gnupg/trustdb.gpg: trustdb created

$ gpg --list-key

显示为空,因为之前没有创建过gpg key

创建gpg key
$ gpg --gen-key

Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
Your selection?    =========================》                 回车
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) ==========================>》回车
Key does not expire at all
Is this correct? (y/N) ===========================》 y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"

Real name: vipzrx
Email address: vipzrx@gmail.com
Comment: vipzrx-comment
You selected this USER-ID:
    "vipzrx (vipzrx-comment) <vipzrx@gmail.com>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? ========================》 o
You need a Passphrase to protect your secret key.
====================================================================》这里输入密码
We need to generate a lot of random bytes. It is a good idea to perform
会需要很长很长时间
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 268 more bytes)
+++++
....+++++
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 72 more bytes)
................+++++

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 112 more bytes)
....+++++
gpg: key ACD99A24 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
pub   2048R/ACD99A24 2013-11-28
      Key fingerprint = 601E E55C 7B9D 9E3C 4A9F  64AA 12FF A237 ACD9 9A24
uid                  vipzrx (vipzrx-comment) <vipzrx@gmail.com>
sub   2048R/41A14E55 2013-11-28

创建gpg key是否成功?

$ gpg --list-key
/home/jb/.gnupg/pubring.gpg
---------------------------
pub   2048R/ACD99A24 2013-11-28
uid                  vipzrx (vipzrx-comment) <vipzrx@gmail.com>
sub   2048R/41A14E55 2013-11-28

重新提交gpg签名的tag

jb@39:~/11$ git tag -s gpg-add -m "gpg-add" -u vipzrx

You need a passphrase to unlock the secret key for
user: "vipzrx (vipzrx-comment) <vipzrx@gmail.com>"
2048-bit RSA key, ID ACD99A24, created 2013-11-28

这时会弹出

输入创建该gpg key时,设置的保护gpg的密钥

密钥输对之后,成功执行,会返回$

gpg: signing failed: secret key not available的更多相关文章

  1. Maven发布封装到中央仓库时候报错:no default secret key: No secret key

    今天因为发布swagger-spring-boot-starter做一个问题的修复,然后碰到了下面这个问题,记录一下解决过程,帮助后续碰到类似问题的童鞋: *gpg: WARNING: "- ...

  2. PHP、Java、C#实现URI参数签名算法,确保应用与REST服务器之间的安全通信,防止Secret Key盗用、数据篡改等恶意攻击行为

    简介 应用基于HTTP POST或HTTP GET请求发送Open API调用请求时,为了确保应用与REST服务器之间的安全通信,防止Secret Key盗用.数据篡改等恶意攻击行为,REST服务器使 ...

  3. Yii2.0 安装使用报错:yii\web\Request::cookieValidationKey must be configured with a secret key.

    下载了Yii2.0的basic版,配置好apache之后,浏览器访问,出现如下错误: Invalid Configuration – yii\base\InvalidConfigException y ...

  4. ssh出错 sign_and_send_pubkey: signing failed: agent refused operation

    在服务器添加完公钥之后,ssh服务器然后报了这个错误 sign_and_send_pubkey: signing failed: agent refused operation 然后执行了以下命令才好 ...

  5. git添加公钥后报错sign_and_send_pubkey: signing failed: agent refused operation

    在服务器添加完公钥后报错 sign_and_send_pubkey: signing failed: agent refused operation 解决方案: eval "$(ssh-ag ...

  6. yii2.0 报错Cookievalidationkey Must Be Configured With A Secret Key

    'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) ...

  7. git添加公钥后报错sign_and_send_pubkey: signing failed: agent refused operation的解决办法

    在服务器添加完公钥后报错 sign_and_send_pubkey: signing failed: agent refused operation 这个时候我们只要执行下 eval "$( ...

  8. yii\web\Request::cookieValidationKey must be configured with a secret key.

    yii\web\Request::cookieValidationKey must be configured with a secret key. 出现的错误表示没有设置  cookieValida ...

  9. yii2安装配置完成后,网页打开报错yii\web\Request::cookieValidationKey must be configured with a secret key

    下载了Yii2.0的basic版,配置好nginx之后,浏览器访问,出现如下错误: Invalid Configuration – yii\base\InvalidConfigException yi ...

随机推荐

  1. Java字节码分析

    目录 Java字节码分析 查看字节码详细内容 javap 实例分析 Java字节码分析 对于源码的效率,但从源码来看有时无法分析出准确的结果,因为不同的编译器版本可能会将相同的源码编译成不同的字节码, ...

  2. C# 加密、解密函数

    #region ========加密======== /// <summary> /// 加密 /// </summary> /// <param name=" ...

  3. 集合、迭代器、增强for循环、泛型

    1集合 集合是java中提供的一种容器,可以用来存储多个数据. 数组的长度是固定的.集合的长度是可变的.集合中存储的元素必须是引用类型数据. 1.1ArrayList集合存储元素(复习) 例: pub ...

  4. zfs和ufs文件系统

    系统环境:freebsd 在zfs文件系统上的文件拷贝到ufs文件系统之后,大小翻了一倍.初步断定是文件系统导致的.不知道以后还会不会有新发现.come on!

  5. PHP的加解密:如何安装ioncube扩展?

    一.下载loader-wizard.php(支持php5.3.php5.4.php5.5.php5.6版本) ioncube提供了一个安装的向导程序,可以非常方便的帮助检测php的运行环境,自动给出提 ...

  6. C#语言基础 Main 函数中的输出输入

    C# 是一门面向对象的编程语言,保留了C  C++等等强大功能,但是它与 Java 非常相似,有许多强大的编程功能,它是微软(Microsoft)专门为.NET应用而开发的一门语言. 也就是人与计算机 ...

  7. MySQL安装未响应解决方法

    安装MySQL出示未响应,一般显示在安装MySQL程序最后2步的3,4项就不动了. 这种情况一般是你以前安装过MySQL数据库服务项被占用了. 1.卸载MySQL 2.删除安装目录及数据存放目录 3. ...

  8. 2018.2.11 JS的定时器制作

    定时器 1.定时器定义 var time = window.setInterval("执行名词",间隔时间) 关闭定时器 clearInterval(定时器名称) 倒计时定时器 s ...

  9. 正确适配苹果ATS审核要求的姿势

    首先,ATS的技术行为不会有任何变化(除了新增两个字段NSAllowsArbitraryLoadsInWebContent和NSRequiresCertificateTransparency,也就是更 ...

  10. OC和C++的混用2

    苹果的Objective-C编译器允许用户在同一个源文件里自由地混合使用C++和Objective-C,混编后的语言叫Objective-C++.有了它,你就可以在Objective-C应用程序中使用 ...