Skip to content

Instantly share code, notes, and snippets.

@drewinglis
Created September 17, 2020 20:49
Show Gist options
  • Save drewinglis/180578002276a7702d839b0ff9cf3a41 to your computer and use it in GitHub Desktop.
Save drewinglis/180578002276a7702d839b0ff9cf3a41 to your computer and use it in GitHub Desktop.
How to set up `lein deploy clojars` as of September 2020

How to set up lein deploy clojars (as of September 2020)

  1. Create an account: https://clojars.org/
  2. Create a deployment token: https://clojars.org/tokens/
  3. Create a ~/.lein/credentials.clj file, which you will shortly encrpyt. The file should look like this:
    {#"clojars"{:username "YOUR_USERNAME_HERE" :password "YOUR_DEPLOY_TOKEN_HERE"}}
    
  4. Encrypt with GPG:
    gpg --output ~/.lein/credentials.clj.gpg --encrypt --recipient YOUR_EMAIL_HERE ~/.lein/credentials.clj
    
  5. Remove the old ~/.lein/credentials.clj file.
    rm ~/.lein/credentials.clj
    

Now lein deploy clojars should work!

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