Auth fail when running `sbt new`

971 views Asked by At

Here's a transcript so far:

$ sbt new lagom/lagom-scala.g8
[info] Loading global plugins from /Users/abrahma/.sbt/1.0/plugins
[info] Set current project to lagomlife (in build file:/Users/abrahma/Bitbucket/Practice-Scala/LagomLife/)
[info] Set current project to lagomlife (in build file:/Users/abrahma/Bitbucket/Practice-Scala/LagomLife/)

ssh://[email protected]/lagom/lagom-scala.g8.git: Auth fail

I've verified authentication with GitHub:

$ ssh -T [email protected]
Hi agam! You've successfully authenticated, but GitHub does not provide shell access.

Also verified that I can access the repo in question (i.e. I can do the following, in a separate location):

git clone ssh://[email protected]/lagom/lagom-scala.g8.git

Edit: fwiw I'm able to work around whatever the root cause is here:

git clone ssh://[email protected]/lagom/lagom-scala.g8.git
g8 file:///Users/abrahma/tmp/lagom-scala.g8
3

There are 3 answers

1
earldouglas On BEST ANSWER

I ran into this problem as well, and solved it by removing the following from my ~/.gitconfig:

[url "[email protected]:"]
  insteadOf = https://github.com/
0
benwaffle On

You need to add your SSH key to the agent:

ssh-add ~/.ssh/id_rsa
0
Eugene Yokota On

Are you using OpenSSH 7.8 or newer, and have you recently created your private key?

If so you might be running into the issue described in “Invalid privatekey” when using JSch aka jsch#129.

The root cause was discovered to be the ssh private key mismatch.

The question has a workaround to convert the key file to an older format if that's the error you're seeing.