You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to publish a subproject as a library to my own repository using an SSH key. SBT asks for a password (which I don't have) instead of using the key.
I'm using SBT 1.9.0. Also tested wth 1.6.2 and get the same results. This is on a Mac (M1 processor) running Ventura 13.4. SBT was installed using Homebrew.
commonSettings has name, version, etc. Nothing related to publishing.
The results of attempting to publish (I manually "pretty printed" the results of show publishTo to make reading easier):
bwbecker@beta-2 oat-degreeAudit3 % sbt
[info] welcome to sbt 1.9.0 (Homebrew Java 11.0.19)
...
sbt:cli> project solver
[info] set current project to solver (in build file:/Users/bwbecker/oat/src/oat-degreeAudit3/)
sbt:solver> show publishTo
[info] Some(SshRepository(
Degree Audit,
Patterns(ivyPatterns=Vector(),
artifactPatterns=Vector(/u1/cs-oat/public_html/maven/[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext]),
isMavenCompatible=true,
descriptorOptional=false,
skipConsistencyCheck=false),
SshConnection(Some(KeyFileAuthentication(cs-oat, /Users/bwbecker/.ssh/oat_rsa, None)),
Some(ubuntu2204-102.cs.uwaterloo.ca),
None),
Some(0644)))
[success] Total time: 0 s, completed Jun. 10, 2023, 8:29:55 a.m.
sbt:solver> publish
[info] Wrote /Users/bwbecker/oat/src/oat-degreeAudit3/_solver/target/scala-2.13/solver_2.13-0.3.0-SNAPSHOT.pom
[error] stack trace is suppressed; run last publish for the full output
[error] (publish) java.io.IOException: SSH_MSG_DISCONNECT: 2 Too many authentication failures
[error] Total time: 28 s, completed Jun. 10, 2023, 8:30:29 a.m.
sbt:solver>
The above showed this dialog box:
Clicking "OK" with a blank password resulted in the java.io.IOException. The first bit of last publish produces:
sbt:solver> last publish
[debug] :: SSH :: connecting to ubuntu2204-102.cs.uwaterloo.ca...
[error] java.io.IOException: SSH_MSG_DISCONNECT: 2 Too many authentication failures
[error] at org.apache.ivy.plugins.repository.ssh.SshCache.getSession(SshCache.java:338)
[error] at org.apache.ivy.plugins.repository.ssh.AbstractSshBasedRepository.getSession(AbstractSshBasedRepository.java:108)
[error] at org.apache.ivy.plugins.repository.ssh.SshRepository.put(SshRepository.java:238)
[error] at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[error] at org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:234)
[error] at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:504)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] at scala.util.Try$.apply(Try.scala:213)
[error] at sbt.internal.librarymanagement.IvyUtil$.retryWithBackoff(IvyUtil.scala:22)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$4(IvyActions.scala:503)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$4$adapted(IvyActions.scala:501)
[error] at scala.collection.Iterator.foreach(Iterator.scala:943)
expectation
I expect SBT to publish the artifact using my SSH key rather than asking for a password.
notes
SSHing manually works:
bwbecker@beta-2 oat-degreeAudit3 % ssh cs-oat@ubuntu2204-102.cs.uwaterloo.ca -i ~/.ssh/oat_rsa
Last login: Sat Jun 10 07:25:59 2023 from 10.40.103.82
cs-oat@ubuntu2204-102:~$
Another library that is set up similarly was successfully published on May 2, 2022. It now shows the same issue. I don't know what changed.
If I remove the keyfile from the .ssh directory, I get the same results. So SBT must not even be trying the SSH key since it surely doesn't know where I put it.
I have multiple SSH keys in ~/.ssh. But I don't think that's a factor because if I rename the .ssh directory, SBT's behaviour is exactly the same.
The ssh key does not use a passphrase.
The text was updated successfully, but these errors were encountered:
I'm trying to publish a subproject as a library to my own repository using an SSH key. SBT asks for a password (which I don't have) instead of using the key.
I'm using SBT 1.9.0. Also tested wth 1.6.2 and get the same results. This is on a Mac (M1 processor) running Ventura 13.4. SBT was installed using Homebrew.
steps
The build for the subproject:
commonSettings
hasname
,version
, etc. Nothing related to publishing.The results of attempting to
publish
(I manually "pretty printed" the results ofshow publishTo
to make reading easier):The above showed this dialog box:
Clicking "OK" with a blank password resulted in the
java.io.IOException
. The first bit oflast publish
produces:expectation
I expect SBT to publish the artifact using my SSH key rather than asking for a password.
notes
~/.ssh
. But I don't think that's a factor because if I rename the.ssh
directory, SBT's behaviour is exactly the same.The text was updated successfully, but these errors were encountered: