tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
borkdude 2020-11-29T10:38:16.088500Z

I'm having a problem with a pretty normal deps.edn:

{:aliases {:json {:extra-deps {cheshire/cheshire {:mvn/version "5.10.0"}}}
           :test {:extra-paths ["test"]
                  :extra-deps {cheshire./cheshire {:mvn/version "5.10.0"}
                               cognitect-labs/test-runner
                               {:git/url "<https://github.com/cognitect-labs/test-runner>"
                                :sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}}
                  :main-opts ["-m" "cognitect.test-runner"]}}}
on CircleCI: https://app.circleci.com/pipelines/github/babashka/babashka.curl/5/workflows/d90fe806-57a4-4c12-bfb3-0277ff1c5be2/jobs/16
Cloning: <https://github.com/cognitect-labs/test-runner>
Error building classpath. <ssh://git@github.com/cognitect-labs/test-runner>: Auth fail
org.eclipse.jgit.api.errors.TransportException: <ssh://git@github.com/cognitect-labs/test-runner>: Auth fail
huh, wat?

borkdude 2020-11-29T10:38:39.088700Z

This was after upgrading to 739

borkdude 2020-11-29T10:47:19.089100Z

I'm suspecting it's a CircleCI problem and not a tools.deps problem... not sure.

borkdude 2020-11-29T10:51:05.089800Z

It seems to clone the repo with ssh//git@..., I'm not sure why

alexmiller 2020-11-29T10:52:25.090700Z

There are git config settings that can force the transport

alexmiller 2020-11-29T10:54:50.091200Z

git config insteadOf

borkdude 2020-11-29T10:56:48.091400Z

in .git/config? or on CircleCI?

alexmiller 2020-11-29T10:57:02.091700Z

The former

borkdude 2020-11-29T10:57:08.091900Z

What are you doing up at 5AM?

alexmiller 2020-11-29T10:57:23.092100Z

¯\(ツ)

borkdude 2020-11-29T10:58:42.092500Z

But .git/config isn't part of the git repo, that's a local thing right?

alexmiller 2020-11-29T11:01:10.093500Z

The only other time I’ve seen this was with a global git config on a local machine

alexmiller 2020-11-29T11:01:32.094Z

Not sure how it would manifest on circle

alexmiller 2020-11-29T11:02:00.094800Z

But that’s the only reason I’m aware of that the transport would change like that

borkdude 2020-11-29T11:18:46.095400Z

On the CircleCI machine:

$ cat /home/circleci/.gitconfig
[url "<ssh://git@github.com>"]
	insteadOf = <https://github.com>
[gc]
	auto = 0

borkdude 2020-11-29T11:19:03.095700Z

That seems to be the culprit, but why the heck is this there.

borkdude 2020-11-29T11:23:07.096Z

rm -rf /home/circleci/.gitconfig
seems to "fix" the problem. 🤷

lispyclouds 2020-11-29T11:45:17.096200Z

As someone writing a CI myself, I would speculate that this is there for private repos. Its easier to pass the creds via SSH key pairs than an HTTP clone where git would go through an interactive prompt for username and passwords. Just my assumptions :thinking_face:

borkdude 2020-11-29T11:47:38.096600Z

Should people not write their own instead of config for this, instead of creating errors like this maybe?

lispyclouds 2020-11-29T11:48:48.096800Z

thats what CircleCI recommends, to add your ssh keys. but yes, this is a problematic assumption i would agree

lispyclouds 2020-11-29T11:51:04.097Z

Also I would imagine this is an issue on CI's outside the source platform, GH actions simply sidesteps this issue as being right there with your code 😛

borkdude 2020-11-29T11:52:29.097200Z

GH has other issues though. Their UI becomes completely unresponsive sometimes and has other weird glitches.

lispyclouds 2020-11-29T11:54:22.097400Z

yeah pros and cons of it all i guess

borkdude 2020-11-29T11:55:14.097600Z

And, I could login via SSH in CircleCI to at least debug this problem :)

lispyclouds 2020-11-29T11:57:55.097800Z

thats definitely a plus point. its getting more and more harder to SSH into things nowadays with all ephemeral magic machines on Kubernetes, rainbows and unicorns 😕

lispyclouds 2020-11-29T12:00:10.098Z

the pro being extremely quickly provisioned runners but all a big powerful totally opaque box

borkdude 2020-11-29T12:01:59.098200Z

yeah, that's what I dislike about it, it's opaque and when it doesn't work, you have nothing to go by

ghadi 2020-11-29T18:03:12.098500Z

https://media4.giphy.com/media/ID4NXWnwuLnLq/giphy.gif

13😄