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

Obscure "no connector" error when repository not configured correctly. #1890

Closed
timmc opened this issue Apr 29, 2015 · 3 comments
Closed

Obscure "no connector" error when repository not configured correctly. #1890

timmc opened this issue Apr 29, 2015 · 3 comments

Comments

@timmc
Copy link
Collaborator

timmc commented Apr 29, 2015

I had the following code in my project.clj -- note the two repositories occupying the same vector:

  :deploy-repositories
  [["releases" {:url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
                :creds :gpg}
    "snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots/"
                 :creds :gpg}]]

When I ran lein deploy, instead of a message about the snapshots repository not being configured, I get a warning about missing credentials and then an error about there not being a Maven connector:

timmc@bc-timmc:~/libre/johnny$ lein deploy
No credentials found for snapshots(did you mean `lein deploy clojars`?)
See `lein help deploying` for how to configure credentials to avoid prompts.
Username: timmc
Password: 
Compiling 49 source files to /home/timmc/libre/johnny/target/classes
Created /home/timmc/libre/johnny/target/johnny-0.1.0-SNAPSHOT.jar
Wrote /home/timmc/libre/johnny/pom.xml
Failed to deploy artifacts/metadata: No connector available to access repository snapshots (snapshots) of type default using the available factories FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory

I think we could probably provide a clearer error than that.

@marick
Copy link
Contributor

marick commented Jan 23, 2016

For people finding this page via a search for "No connector available to access repository snapshots" lein leiningen who are also inexpert in things Maven-ey:

This is an error message you can get by deploying a major-minor-tiny-SNAPSHOT version to clojars via lein deploy when you don't have a ["snapshots" :clojars] entry in :deploy-repositories in your project.clj. If you make that latter look like the following, lein deploy will work:

  :deploy-repositories [["releases" :clojars]
                        ["snapshots" :clojars]]

Alternately, you can just use lein deploy clojars.

tacticiankerala added a commit to multunus/dashboard-clj that referenced this issue Jun 26, 2016
@technomancy
Copy link
Owner

This is unfortunate, but I don't think it's worth handling this particular potential mistake specifically; better to handle it in #2223.

@timmc
Copy link
Collaborator Author

timmc commented May 23, 2017

Makes sense! And the error is searchable here in the meantime. :-)

j-cr added a commit to j-cr/leiningen that referenced this issue Jul 22, 2018
j-cr added a commit to j-cr/leiningen that referenced this issue Jul 22, 2018
technomancy added a commit that referenced this issue Jul 27, 2018
Update DEPLOY.md as proposed in #1890
transducer pushed a commit to transducer/cljs-iota-mam that referenced this issue Aug 29, 2018
So that major-minor-tiny-SNAPSHOT releases can be deployed.

See technomancy/leiningen#1890
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

3 participants