"lein deploy clojars" does not request a passphrase

I want to deploy the Clojure library using Leiningen. I have done the following:

  • gpg installed
  • created a gpg key pair
  • encrypted my Clojars credentials in ~ / .lein / credentials.clj.gpg
  • gpg-agent installed
  • Keychain installed

When I call "lein deploy clojars", I get the following output:

WARNING: please set :license in project.clj. Could not decrypt credentials from ~/.lein/credentials.clj.gpg gpg: can't query passphrase in batch mode gpg: decryption failed: secret key not available See `lein help gpg` for how to install gpg. No credentials found for clojars See `lein help deploy` for how to configure credentials. Username: 

Then I removed gpg, installed gpg2 and made a symbolic link from gpg to gpg2. When I now call "lein deploy clojars", I get:

 WARNING: please set :license in project.clj. ^CCould not decrypt credentials from ~/.lein/credentials.clj.gpg pinentry-curses: no LC_CTYPE known - assuming UTF-8 pinentry-curses: no LC_CTYPE known - assuming UTF-8 pinentry-curses: no LC_CTYPE known - assuming UTF-8 pinentry-curses: no LC_CTYPE known - assuming UTF-8 gpg: signal Interrupt caught ... exiting See `lein help gpg` for how to install gpg. No credentials found for clojars See `lein help deploy` for how to configure credentials. Username: 

After warning, the command expects input, from which I can exit only by pressing ctrl-c.

Can someone tell me what I need to do to deploy the library?

+4
source share
1 answer

lein made clojars installation as easy as clojars with the lein-clojar plugin .

First create a ~/.lein/profiles.clj file with the following contents:

 {:user {:plugins [[lein-clojars "0.9.1"]]}} 

Unfortunately, you cannot use password keys with the lein-clojar , but you can generate a new ssh key using the lein keygen command. It will put the new ssh key in ~/.leiningen/ , so it will only be used by lein .

After generating the key, lein print its public part on the console. You must copy it to your clojars account.

Finally, you can deploy your project with lein push .

Of course, you can deploy your project without these plugins with lein deploy clojars and any ssh or pgp . It is probably possible to use pathphrased keys with lein deploy clojars , but I'm not sure about that.

+2
source

Source: https://habr.com/ru/post/1483575/


All Articles