foundweekends / giter8

a command line tool to apply templates defined on GitHub
https://www.foundweekends.org/giter8/
Apache License 2.0
1.74k stars 223 forks source link

Auth fail on sbt new #674

Open salvalcantara opened 2 years ago

salvalcantara commented 2 years ago

Steps

Set up a template project on a private Gitlab instance using the following build.properties:

sbt.version=1.6.2
giter8.version=0.14.0

then run

sbt new git@gitlab.com:company/private/template-project.g8.git

Problem

I'm getting the following error

git@gitlab.com:company/private/template-project.g8.git: Auth fail

However, if I install g8 using Coursier, it just works:

g8 git@gitlab.com:company/private/template-project.g8.git

Cloning the repo works just fine, too

git clone git@gitlab.com:company/private/template-project.g8.git

Expectation

The sbt new command creates the project without errors.

Notes

For what it's worth, the above versions in build.properties match my local versions for both sbt (installed via Homebrew) and giter8 (installed via Coursier as a workaround for sbt new). The problem should have been solved in https://github.com/foundweekends/giter8/pull/583, but I'm using the latest sbt/g8 versions and still getting the Auth fail error.

TonioGela commented 2 years ago

@eed3si9n this is interesting, in particular since g8 alone works while from sbt new it doesn't. Maybe Apache Mina in the g8 classpath gets overridden by jsch in the sbt classpath. Couldn't that be the case? What do you think?

eed3si9n commented 2 years ago

It would be good to revisit this now that sbt 1.7.2 is out with Mina-enabled Giter8.