【问题标题】:How to solve "No credentials found for releases (did you mean `lein deploy clojars`?)"?如何解决“找不到发布的凭据(您的意思是 `lein deploy clojars`?)”?
【发布时间】:2016-09-01 06:30:39
【问题描述】:

我正在尝试使用 Leiningen 将(非快照)库部署到 Clojars。实际上,我之前已经能够部署这个库,但那是不久前的事了,现在我做了一些我想要发布的修复。我什至有一个用于处理发布和部署过程的小 bash 脚本,它基本上只是做:

RELEASE_VERSION=${releaseVersion} lein release

其中releaseVersion 作为参数提供给脚本。我正在使用lein-release 插件并且我已经指定:

:lein-release {:deploy-via :clojars}

在我的project.clj。我在/Users/johan/.lein/credentials.clj.gpg 中也有工作(或至少他们曾经工作过)GPG 凭证。

在运行 lein release 时,系统会提示我输入 GPG 密码,但几秒钟后我遇到了这个问题:

$ RELEASE_VERSION=0.2.1 lein release
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
[master cf4e5d1] Version 0.2.1
 1 file changed, 1 insertion(+), 1 deletion(-)

You need a passphrase to unlock the secret key for
user: "Johan <email>"
2048-bit RSA key, ID ABC123431, created 2015-11-12

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.

我也尝试在我的project.clj 中设置repositories

:repositories [["releases" {:url "http://clojars.org/repo" :creds :gpg}]]

但这并没有什么不同。有谁知道如何解决这个问题?

【问题讨论】:

    标签: clojure release leiningen


    【解决方案1】:

    问题是我不小心从我的~/.lein/profiles.clj 文件中的{:user {:plugins .. }} 中删除了[lein-release "1.0.9"]。当我再次添加它时,一切都按预期工作。

    【讨论】:

      猜你喜欢
      • 2013-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-25
      • 2020-09-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多