Closed NotNite closed 3 years ago
Yeah, I've noticed this issue like a month ago or so, it is not a bug. Here how it goes:
keygen -t rsa -b 4096 -C "your_email@example.com" -m PEG
(notice the -m PEM).And I can definitely guarantee you it is not abandoned xD
edit: I will be making a change on the Wiki to indicate this nowadays required flag to keygen
That worked! Thank you so much!
$ ssh-keygen -t rsa -b 4096 -m PEM -C "lit"
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\Julian/.ssh/id_rsa): ./lit
./lit already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./lit.
Your public key has been saved in ./lit.pub.
$ lit auth notnite
lit version: 3.8.5
luvi version: v2.12.0
command: auth notnite
load config: C:\Users\Julian\AppData\Roaming\litconfig
username: notnite
name: NotNite
email: hi@notnite.com
privateKey: C:\Users\Julian\.ssh\lit
# omitted because i'm not sure if this is private or not lol
update config: C:\Users\Julian\AppData\Roaming\litconfig
done: success
$
Thanks for also changing the wiki, I'm sure it'll save some other tired developers trying to make individual keys.
For clarification for any further users who make it here: openssh's ssh-keygen
command defaults to outputting public and private keys in the RFC4716 "SSH Public Key File Format" rather than the older RFC1421 PEM format that lit auth
expects.
This can be fixed by passing along the -m PEM
flag which will generate the "correct" key format.
Another thing to note is that even with the fall in popularity in RSA keys in favor of ED25519, RSA currently remains as the only way to use lit auth
(Note: my setup is a bit cursed here, zsh on Windows via Git Bash; this isn't the fault of the error. I've tested this in PowerShell 5 and 7, same results.)
I'm trying out Luvit and went to run
lit auth
, when I was greeted with this rather cryptic error:This is a fresh
ssh-rsa
key I just generated:And a little test file recreating behavior:
It's definitely a valid key, I was able to SSH into servers and pull Git repositories with it:
Am I doing something wrong? I know Lit requires RSA keys and assumes
~/.ssh/id_rsa
to be the path of the file, but:lit
key is RSA. I tried using my main Git key first (which is ed25519), but it gave the same error.~/.ssh/id_rsa
just in case and just got the same error, without a prompt for the path this time.Since I got the same error from my ed25519 key, I'm assuming this is because it's failing to parse it. Why it would be, I have no clue.
(Also, uh, anyone there? The newest issue was last interacted with 29 days ago... is this abandoned? I can't tell...)