2016-09-01 54 views
2

我想使用Leiningen将一个(非快照)库部署到Clojars。实际上,我之前已经能够部署这个库,但之前它已经做了一些我想要发布的修复。我甚至有一个用来处理释放一个小bash脚本和部署过程中,基本上只是做:如何解决“没有找到发布的凭证(你的意思是`lein deploy clojars`?”)?

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}]] 

但它没有任何区别。有谁知道如何解决这个问题?

回答

1

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

相关问题