Skip to content

Instantly share code, notes, and snippets.

@hiteshjasani
Last active March 3, 2018 04:25
Show Gist options
  • Save hiteshjasani/4e83b9b87c6f3b252f8e0908b893ec8e to your computer and use it in GitHub Desktop.
Save hiteshjasani/4e83b9b87c6f3b252f8e0908b893ec8e to your computer and use it in GitHub Desktop.
GPG, lein and clojars

Solution

$ GPG_TTY=$(tty) lein deploy clojars

This will pop up an ascii window asking for the password to the key. It then continues with the deploy to clojars.

Errors during signing

Deploying to Clojars fails because gpg is not able to sign the jar.

$ lein deploy clojars              
Created /Users/hitesh/dev/research/open-source-contribs/jasani-serverless-lumo-t
emplate/target/lein-template-0.1.0.jar                                          
Wrote /Users/hitesh/dev/research/open-source-contribs/jasani-serverless-lumo-tem
plate/pom.xml                                                                   
Need to sign 2 files with GPG                                                   
[1/2] Signing /Users/hitesh/dev/research/open-source-contribs/jasani-serverless-
lumo-template/target/lein-template-0.1.0.jar with GPG                           
gpg: using "E60C08D577C9E0A5ACB636894A22344842572551" as default secret key for 
signing                                                                         
gpg: signing failed: Inappropriate ioctl for device                             
gpg: signing failed: Inappropriate ioctl for device                             
Could not sign /Users/hitesh/dev/research/open-source-contribs/jasani-serverless
-lumo-template/target/lein-template-0.1.0.jar                                   
gpg: using "E60C08D577C9E0A5ACB636894A22344842572551" as default secret key for 
signing                                                                         
gpg: signing failed: Inappropriate ioctl for device                             
gpg: signing failed: Inappropriate ioctl for device                             


See `lein help gpg` for how to set up gpg.                                      
If you don't expect people to need to verify the authorship of your jar, you    
can add `:sign-releases false` to the relevant `:deploy-repositories` entry.

Resources

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