leiningen icon indicating copy to clipboard operation
leiningen copied to clipboard

Better error handling around repository credentials

Open nickmbailey opened this issue 9 years ago • 4 comments

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.

nickmbailey avatar Dec 11 '15 18:12 nickmbailey

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.

hypirion avatar Dec 19 '15 22:12 hypirion

I would love to work on that if there are no concerns :)

maxprokopiev avatar Nov 03 '16 13:11 maxprokopiev

@maxprokopiev: Go ahead :)

hypirion avatar Nov 06 '16 22:11 hypirion

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.

devurandom avatar Feb 01 '19 10:02 devurandom