Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling around repository credentials #2039

Open
nickmbailey opened this issue Dec 11, 2015 · 4 comments
Open

Better error handling around repository credentials #2039

nickmbailey opened this issue Dec 11, 2015 · 4 comments

Comments

@nickmbailey
Copy link
Contributor

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.
@hypirion
Copy link
Collaborator

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 hypirion modified the milestones: 2.6.1, 2.6.2 Feb 5, 2016
@hypirion hypirion modified the milestones: 2.6.2, 2.7.1 Aug 30, 2016
@maxprokopiev maxprokopiev self-assigned this Nov 3, 2016
@maxprokopiev
Copy link
Collaborator

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

@hypirion
Copy link
Collaborator

hypirion commented Nov 6, 2016

@maxprokopiev: Go ahead :)

@hypirion hypirion removed this from the 2.8.0 milestone Jun 3, 2017
brstf pushed a commit to brstf/leiningen that referenced this issue Sep 17, 2017
…omancy#2039)

This adds a warning when leiningen attempts to access credentials.clj.gpg stored in  as well as warnings whenever a specified repository credential cannot be resolved, including the credential key and any place that leiningen looked for the credential. Currently investigating how to only print the credential resolution warning when the credentials are actually used as opposed to when they are resolved. If a warning is printed only at resolution time, leiningen may succeed at it's current task despite the fact that credentials were not found, superfluously warning the user about unneeded credentials.
@devurandom
Copy link

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.

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

No branches or pull requests

4 participants