2

The getting started page for Dotty gives this instruction for starting a new project:

Create a Dotty project:

sbt new lampepfl/dotty.g8

When I run this, I get this error:

git@github.com:lampepfl/dotty.g8.git: invalid privatekey: [B@58aa5c94

It appears that possibly my authentication with GitHub is failing. Some googling led me to this answer which says it is due to using a newer OpenSSH id_rsa key.

So I created a new SSH key ~/.ssh/id_rsa.nonopenssh, added it to my SSH agent, and added it to my GitHub account, but I'm still getting the error. How do I fix this?

stefanobaghino
  • 11,253
  • 4
  • 35
  • 63
Cory Klein
  • 51,188
  • 43
  • 183
  • 243

1 Answers1

0

I think that merely adding the non-OpenSSH key is not good enough. For me I could only get it working once I'd removed the OpenSSH key from GitHub entirely. I also named the non-OpenSSH key ~/.ssh/id_rsa, which may not be necessary but it's what I did.

Summary:

  1. (Might be optional) Rename your OpenSSH id_rsa keys: cd ~/.ssh && mv id_rsa id_rsa.bak && mv id_rsa.pub id_rsa.pub.bak
  2. Generate a new RSA key: ssh-keygen -t rsa -m PEM
  3. ssh-add -K ~/.ssh/id_rsa
  4. Delete the old key from GitHub
  5. Add the key to GitHub
Cory Klein
  • 51,188
  • 43
  • 183
  • 243