Fork me on GitHub
#tools-deps
<
2018-03-28
>
semperos04:03:04

When specifying :git/url in my deps.edn, I appear to have to use http:// rather than https://. When using https://, the initial message indicates that it's cloning anonymously, but then I get error messages and stack traces showing that it's trying to use . Using http:// does not present this problem and the repo is cloned anonymously as expected.

## clj details
clj -Sdescribe
{:version "1.9.0.358"
 :config-files ["/usr/local/Cellar/clojure/1.9.0.358/deps.edn" "/Users/dgregoire/.clojure/deps.edn" "deps.edn" ]
 :install-dir "/usr/local/Cellar/clojure/1.9.0.358"
 :config-dir "/Users/dgregoire/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}

## deps.edn entry for depstar (that fails)
    com.healthfinch/depstar {:git/url ""
                             :sha "4aa7b35189693feebc7d7e4a180b8af0326c9164"}

## Error that occurs when it tries to check out depstar
Cloning: 
Error building classpath. [email protected]:healthfinch/depstar: USERAUTH fail
org.eclipse.jgit.api.errors.TransportException: [email protected]:healthfinch/depstar:
 USERAUTH fail
        at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:248)
        at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:306)
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:200)
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:89)
        at clojure.tools.gitlibs.impl$call_with_auth.invokeStatic(impl.clj:50)
        at clojure.tools.gitlibs.impl$call_with_auth.invoke(impl.clj:41)
        at clojure.tools.gitlibs.impl$git_clone_bare.invokeStatic(impl.clj:71)
        at clojure.tools.gitlibs.impl$git_clone_bare.invoke(impl.clj:68)
        at clojure.tools.gitlibs.impl$ensure_git_dir.invokeStatic(impl.clj:106)
        at clojure.tools.gitlibs.impl$ensure_git_dir.invoke(impl.clj:100)
        at clojure.tools.gitlibs$resolve.invokeStatic(gitlibs.clj:33)
        at clojure.tools.gitlibs$resolve.invoke(gitlibs.clj:29)
        at clojure.tools.gitlibs$procure.invokeStatic(gitlibs.clj:47)
        at clojure.tools.gitlibs$procure.invoke(gitlibs.clj:41)
        at clojure.tools.deps.alpha.extensions.git$eval822$fn__824.invoke(git.clj:4
1)
        at clojure.lang.MultiFn.invoke(MultiFn.java:238)
        at clojure.tools.deps.alpha$expand_deps.invokeStatic(alpha.clj:168)
        at clojure.tools.deps.alpha$expand_deps.invoke(alpha.clj:152)
        at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:215)
        at clojure.tools.deps.alpha$resolve_deps.invoke(alpha.clj:197)
etc.

Alex Miller (Clojure team)05:03:44

seems weird. can you use -Sforce too to make sure youโ€™re not seeing something in cache?

semperos05:03:07

-Sforce shows same behavior; deleted ~/.gitlibs and local .cpcache as well, no change

seancorfield05:03:11

@semperos [email protected]:healthfinch/depstar does not indicate an https: URL -- that sounds like you've used an SSH URL instead.

semperos05:03:03

could be that it's late and I'm missing something obvious, but the :git/url in my deps.edn (pasted above) is ""

seancorfield05:03:46

This worked for me

sean@sean-xps:~/clojure$ clj -Sdeps '{:deps {com.healthfinch/depstar {:git/url "" :sha "68f3a04f75c988fa032974e8c600c9086812e9ef"}}}'
Cloning: 
Checking out:  at 68f3a04f75c988fa032974e8c600c9086812e9ef
Clojure 1.9.0
user=>

seancorfield05:03:14

So try a later SHA.

semperos05:03:47

clj -Sdeps '{:deps {com.healthfinch/depstar {:git/url "" :sha "68f3a04f75c988fa032974e8c600c9086812e9ef"}}}'
Cloning: 
Error building classpath. [email protected]:healthfinch/depstar.git: USERAUTH fail
org.eclipse.jgit.api.errors.TransportException: [email protected]:healthfinch/depstar.
git: USERAUTH fail

semperos05:03:10

not limited to this repo, it's happening for others

seancorfield05:03:14

Are you on the latest clj / tools.deps ?

semperos05:03:47

I pasted my info above, I believe I am; my $HOME/.clojure/deps.edn is blank and my /usr/local one is:

{
  :paths ["src"]
  :deps {
    org.clojure/clojure {:mvn/version "1.9.0"}
  }
  :aliases {
    :deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.417"}}}
    :test {:extra-paths ["test"]}
  }
  :mvn/repos {
    "central" {:url ""}
    "clojars" {:url ""}
  }
}

seancorfield05:03:07

sean@sean-xps:~/clojure$ clj -Sverbose
version      = 1.9.0.358
install_dir  = /usr/local/lib/clojure
config_dir   = /home/sean/.clojure
config_paths = /usr/local/lib/clojure/deps.edn /home/sean/.clojure/deps.edn deps.edn
cache_dir    = /home/sean/.clojure/.cpcache
cp_file      = /home/sean/.clojure/.cpcache/3092062292.cp

Clojure 1.9.0
user=>

semperos05:03:49

I deleted the cache in the local folder, I'll try clearing out the other cache dirs // no dice

semperos05:03:09

clj -Sverbose
version      = 1.9.0.358
install_dir  = /usr/local/Cellar/clojure/1.9.0.358
config_dir   = /Users/dgregoire/.clojure
config_paths = /usr/local/Cellar/clojure/1.9.0.358/deps.edn /Users/dgregoire/.clojure/deps.edn deps.edn
cache_dir    = /Users/dgregoire/.clojure/.cpcache
cp_file      = /Users/dgregoire/.clojure/.cpcache/2178403036.cp
Refreshing classpath
Clojure 1.9.0
user=>

seancorfield05:03:51

I just tried it on OS X like you

Tue Mar 27 22:28:33
(sean)-(jobs:0)-(~/clojure/semperos)
(! 504)-> clj -Sdeps '{:deps {com.healthfinch/depstar {:git/url "" :sha "68f3
04f75c988fa032974e8c600c9086812e9ef"}}}'
Cloning: 
Checking out:  at 68f3a04f75c988fa032974e8c600c9086812e9ef
Clojure 1.9.0
user=> ^D

Tue Mar 27 22:29:20
(sean)-(jobs:0)-(~/clojure/semperos)
(! 505)->

seancorfield05:03:23

(sorry for the weird line breaks there -- I'm ssh'ing into my Mac from Ubuntu on my Windows 10 laptop!)

semperos05:03:26

thanks for giving it a try; glad to know I'm the exception in this regard ๐Ÿ™‚

semperos05:03:31

picard-facepalm I apologize for the spam, I have an entry in my global ~/.gitconfig that was the culprit

seancorfield05:03:39

Oh, interesting... what was it?

semperos05:03:14

if I do straight git clone things work as expected

seancorfield05:03:20

Ah... that's good to know...

ghadi14:03:16

@semperos JGit is too clever

semperos14:03:31

my thoughts too ๐Ÿ™‚

stephenmhopper18:03:57

Hi, I have two questions. (1) Is there a way to make options required for tools.cli and (2) why doesn't the tools.cli repo have an issues tab? https://github.com/clojure/tools.cli

ghadi18:03:19

Clojure projects's issues are managed through JIRA, not Github -- see CONTRIBUTING.md

ghadi18:03:12

bug tracker ^

stephenmhopper18:03:12

Ah, I guess I didn't realize that JIRA was used for anything not in the core Clojure releases. Also, I think I might have answered my own question: https://dev.clojure.org/jira/browse/TCLI-12

4
seancorfield18:03:46

@stephenmhopper Is the :missing approach sufficient for you? (and, BTW, tools.cli is not tools.deps / clj -- that seems to be a common confusion nowadays)

stephenmhopper18:03:36

@seancorfield Yeah, :missing seems to be working for me. And yeah, I wasn't sure if this was the right channel or not. #clojure seemed too broad. Perhaps setting the topic for the channel would prevent confusion from folks in the future.

seancorfield18:03:04

(The purpose mentions tools.dep api but that only shows when you have the Channel Details panel open)

stephenmhopper18:03:29

Cool. Thank you!

seancorfield18:03:58

I've also had folks open JIRA issues against tools.cli thinking it's the clj/`clojure` command line tooling ๐Ÿ™‚

seancorfield18:03:20

I maintain tools.cli so I'm happy to field any questions you have about it.