'Why is SBT 1.5.5 ignoring my Resolver.ssh

I am having trouble with ssh/sftp resolver again. I had this working for years, then didn't use it the last couple of years, but now we need it again, and it doesn't work. This version is a little changed based on todays messing around.

The resolver is defined and added to SBT run, but when I try to use it, it's thrown out as unrecognized.

Any idea's? Am I missing something? I there a way to get SBT to tell me more about the problem?

Thanks!

Using sbt 1.5.5 and Java 8

ThisBuild / resolvers += {
  val privateKeyFile = new java.io.File(sys.env("HOME") + "/.ssh/id_rsa")
  Resolver.ssh(name = "MY REPO",
  hostname = gitServer,
  basePath = "/repoPath/")(Resolver.ivyStylePatterns) as(sys.env("USER"), privateKeyFile)
}
  
ProjectName(develop)> show resolvers

[info] * SshRepository(MY REPO,
Patterns(ivyPatterns=Vector(/repoPath/[organisation]/[module]/(scala_[scalaVersion]/)
(sbt_[sbtVersion]/)([branch]/)[revision]/[type]s/[artifact](-[classifier]).[ext]),
artifactPatterns=Vector(/repoPath/[organisation]/[module]/(scala_[scalaVersion]/)
(sbt_[sbtVersion]/)([branch]/)[revision]/[type]s/[artifact](-[classifier]).[ext]),
isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false), 
SshConnection(Some(KeyFileAuthentication(myUser, /home/myUser/.ssh/id_rsa, None)),
Some(hostname), None), None)

ProjectName(develop)>

[warn] Unrecognized repository MY REPO, ignoring it
[info] Updating 
[info] Resolved  dependencies
[warn] 
[warn]  Note: Unresolved dependencies path:
...
sbt


Solution 1:[1]

I had the same issue, it seems to be related with "coursier".

In my case it worked by setting:

useCoursier := false

In the build.sbt file.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jose Jurado