This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-14
Channels
- # asami (1)
- # babashka (50)
- # beginners (70)
- # bristol-clojurians (6)
- # calva (36)
- # chlorine-clover (1)
- # cider (4)
- # clj-kondo (3)
- # cljdoc (49)
- # cljsrn (5)
- # clojure (96)
- # clojure-australia (3)
- # clojure-dev (1)
- # clojure-europe (84)
- # clojure-nl (4)
- # clojure-spec (9)
- # clojure-uk (65)
- # clojurescript (31)
- # community-development (6)
- # conjure (17)
- # cursive (8)
- # datascript (5)
- # datomic (12)
- # duct (3)
- # emacs (18)
- # figwheel-main (2)
- # fulcro (7)
- # helix (1)
- # jobs (3)
- # luminus (7)
- # off-topic (77)
- # pathom (3)
- # portal (1)
- # rdf (4)
- # re-frame (1)
- # reitit (4)
- # remote-jobs (4)
- # reveal (15)
- # rum (1)
- # sci (38)
- # shadow-cljs (22)
- # spacemacs (1)
- # specter (6)
- # sql (1)
- # test-check (1)
- # tools-deps (60)
- # vim (12)
Can anyone think of a reason why someone might be getting USERAUTH fail
when using clj
to attempt to fetch a public repository via https
? 😕
If you could share a repro that would help
Sure thing.
clj -Sdeps '{:deps {probcomp/metaprob {:git/url "" :sha "8dc9d09f747c1e29886bb9628a0110c6f6bc6f5a"}}}'
Here’s what he’s seeing: https://a.cl.ly/llu2n0yR
well it's a git dep
FWIW, that command-line works fine for me on WSL2 (Ubuntu) on Windows 10 and also on macOS 10.12.
Can't test it on Powershell since I don't have the Clojure CLI installed on Windows natively any more.
I agree though that it does look like it's trying to use ssh though
@alexmiller Where could the jgit stuff be getting auth from that might cause a failure with a public git repo?
it's not that that it's not getting auth but that it's looking for it in the first place
> well it’s a git dep Sorry, what I meant was: I’m confused that it appears to be trying to fetch via SSH.
is there any chance that they have a ~/.gitconfig with a url.<base>.insteadOf set?
that allows you to direct git to use a different url instead of the original one and can be used to swap https for ssh urls
Or perhaps they have a deps.edn
file in that directory that already specifies that library via git@github
?
the -Sdeps is merged last so that shouldn't affect anything
(they're running that command in their downloads folder so who knows what is in there)
should look for [url "[email protected]:"]
and then an insteadOf
line in /.gitconfig
- something like that
[url "[email protected]:"]
insteadOf =
I was able to repro with that
could even be more generic like:
[url "git://"]
insteadOf = https://
can't say I've ever messed with that config before!
The colleague having the issue is wanting to do some volunteer work on some of our private repositories, and I suspect he probably has a lot going on in his ~/.ssh/config
from his job.
From talking to Ghadi earlier I know how to set up a new machine for use with clj
+ private repositories, but I’m not clear yet on how to configure a machine that has a lot of extant ~/.ssh/config
settings.
well, the answer is probably ... it depends
For instance, I know that because of JSch
clj
doesn’t play well with IdentityFile
declarations, and should instead be set up to read keys from the ssh-agent
, but I don’t think I can ask this person to change their ~/.ssh/config
in a way that might impact their work setup.
> it depends
Yeah, I suppose there’s no way out but through. I’m going to have to understand what their existing ~/.ssh/config
settings are doing in detail.
To close this loop, he had this in his ~/.gitconfig
:
[url "[email protected]:"]
insteadOf =
Thanks, @alexmiller and @U04V70XH6!
Was he OK with removing that to get clj
to work?
(I'm kind of curious as to why anyone would want all
URLs to switch the ssh access version?)
He’s at his day job at the moment, so I won’t know more (why he had that in there, if he’s OK removing it) until this evening, probably.
:thumbsup:
(you'll probably need to generate a pom.xml
file first -- I can't remember)
no, you don't - you can either rely on the pom inside the jar or supply the g/a/v externally
Oh, and that's assuming you're on 1.10.1.697 or later.
@alexmiller how safe is it to rely on tdeps putting src/main/clojure on the classpath indefinitely?
@dominicm I didn't think it did? :paths ["src"]
is in the system deps
I'm confused by what you mean
@alexmiller there's always src/main/clojure added when doing a local/root to a pom.xml right now.
So local dep with pom.xml