【问题标题】:When trying to deploy a Clojure jar, signing fails with: secret key not available尝试部署 Clojure jar 时,签名失败并显示:密钥不可用
【发布时间】:2015-11-17 18:02:26
【问题描述】:

我正在尝试将我的库部署到-jdbc-url 并且签名失败:

$ lein release
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)
nothing to commit, working directory clean
[master 23b2409] Version 0.3.0
 1 file changed, 1 insertion(+), 1 deletion(-)
gpg: skipped "J. Pablo Fernández <pupeno@carouselapps.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
No credentials found for releases (did you mean `lein deploy clojars`?)
Password prompts are not supported when ran after other (potentially)
interactive tasks.
See `lein help deploy` for an explanation of how to specify credentials.

我的钥匙在那儿:

$ gpg --list-secret-keys
/Users/pupeno/.gnupg/secring.gpg
--------------------------------
sec   2048R/F2FB1C6F 2015-07-15 [expires: 2016-07-14]
uid                  J. Pablo Fernández <pupeno@carouselappps.com>
ssb   2048R/E1A0E03B 2015-07-15

我还安装了 gpg-agent 以防万一:

$ gpg-agent
gpg-agent: gpg-agent running and available

我尝试使用 Leiningen 2.5.2 和 2.5.1。

发生了什么事?我错过了什么?

【问题讨论】:

    标签: clojure leiningen gnupg clojars


    【解决方案1】:

    我对@9​​87654321@ 和签名没有任何经验,

    但很明显你的钥匙有

    J. Pablo Fernández &lt;pupeno@carouselappps.com&gt;

    当你尝试使用时(检查信p)

    J. Pablo Fernández &lt;pupeno@carouselapps.com&gt;

    【讨论】:

      【解决方案2】:

      我发现全局设置我的 lein gpg 密钥最简单,请参见此处:

      https://github.com/technomancy/leiningen/blob/master/doc/GPG.md#overriding-the-gpg-defaults

      因此,我的 ~/.lein/profiles.clj 文件看起来像:

      {:user {:plugins [[lein-auto "0.1.2"]]
              :signing {:gpg-key "<mykey>"}}}
      

      &lt;mykey&gt; 使用 gpg --list-keys 找到的位置

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-06-16
        • 1970-01-01
        • 1970-01-01
        • 2017-12-31
        • 1970-01-01
        • 2022-07-12
        • 2020-05-19
        • 1970-01-01
        相关资源
        最近更新 更多