leiningen
leiningen copied to clipboard
Better error handling around repository credentials
There is some room for improvement around the error handling/messaging for repository credentials. For example:
- If gpg is not installed, there is just a "could not run gpg" error rather than a message pointing to the docs (if gpg is installed but misconfigured you get the correct error message).
- If gpg is specified but no credentials.clj.gpg file exists, lein just fails with an auth error rather than pointing to the docs on setting up credentials.clj.gpg
- Similarly for env, if credentials are stored in the environment, but the necessary environment variables aren't present, lein should indicate which environment variables need to be set first.
Yes, I agree that usability related to GPG is rather bad. Happy to take patches for this.
Some of these fixes may be newbie-friendly.
I would love to work on that if there are no concerns :)
@maxprokopiev: Go ahead :)
I have an issue where my ~/.lein/credentials.clj.gpg
contains {#"https://repo.clojars.org" {:username "..." :password "..."}}
just as in the example in the deploy docs, but still lein deploy clojars
reports: No credentials found for clojars
. This error message does not explain why the key #"https://repo.clojars.org"
did not match / what string Leiningen tried to match against.