Skip to content

Instantly share code, notes, and snippets.

@hiteshjasani
Last active November 10, 2022 08:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hiteshjasani/b34b2db86a476279ec0ed981c688155b to your computer and use it in GitHub Desktop.
Save hiteshjasani/b34b2db86a476279ec0ed981c688155b to your computer and use it in GitHub Desktop.
Clojars instructions

Publish Release

  1. Update version in project.clj
  2. lein deploy clojars

Setup

Project

1. Ensure prefix is on project in project.clj

(defproject org.jasani/my-project ...

GPG

1. Install gpg

brew install gpg

2. Generate key

gpg --gen-key

  • Use the default kind of key: RSA and RSA (default)
  • 2048 or 4096 keysize
  • Expire in 2years

3. Mark the public key for signing

Use gpg --list-keys to see the 8 digit hex ID of the public key. Add it to ~/.lein/profiles.clj as

{:user {:signing {:gpg-key "ABCD1234"}}}

4. On Mac OSX, need to install pinentry-mac for gpg-agent to work

brew install pinentry-mac

echo 'pinentry-program /usr/local/bin/pinentry-mac' > ~/.gnupg/gpg-agent.conf

5. Ensure clojars credentials are in ~/.lein/profiles.clj

{:auth {:repository-auth {#"https://clojars.org/repo"
                          {:username "" :password ""}}}}

6. Make public key available

gpg --send-keys ABCD1234

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment