Fork me on GitHub
#leiningen
<
2019-04-16
>
Jakub Holý (HolyJak)19:04:39

Why doesn't lein find my deploymen credentials for clojars, any idea? The creds exist:

gpg --quiet --batch --decrypt ~/.lein/credentials.clj.gpg  
{#"" {:username "holyjak" :password "secret"}}
and I say to use gpg creds in my project.clj:
;; project.clj
;; ...
:repositories [["releases" {:url "" :creds :gpg}]]
yet I am still told > $ lein deploy clojars > No credentials found for clojars Is the problem in "clojars" vs. "https://repo.clojars.org" or where? Thank you!!!

4
Jakub Holý (HolyJak)21:04:45

I have fixed it be removing the entry in project.clj and adding it instead to ~/.lein/profiles.clj as

{:user {:deploy-repositories [["clojars" {:url "" :creds :gpg}]]
i.e. with "clojars" as the name, not "releases". I also need to run gpg --quiet --batch --decrypt ~/.lein/credentials.clj.gpg so that gpg-agent caches the psw for my key as lein doesn't prompt for it and just fails with "gpg: decryption failed: No secret key", which is a known issue.