openssl: Load key "id_rsa": error in libcrypto

❯ uname -a
Linux BL4CK4RCH 6.1.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 14 Jan 2023 13:09:35 +0000 x86_64 GNU/Linux
all help are welcome to fix that. Regards.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 15 (3 by maintainers)
Hey guys, for future readers. I was using a ssh key file inside Gitlab CI YAML file and I kept getting
error in libcryptomessage. I did 2 things that FIXED the problem:FILEvariable toENV_VARssh-keygen -t ed25519when generating the key. Looks like gitlab does not support the defaultrsakeys.Then everything works fine.
Also use this as the base
before_script:Answering here for another use case just because it was top result with this problem. I was facing this same error and it was due to some extra carriage return character i.e. ‘\r’, in the file. I was coping the private key from a variable store and saving it into the machine using python. I replaced the ‘\r’ with null character using the code below and the issue was resolved.
I use kali on WSL also has this problem。
oh!!!I solve it ,It’s all my fool…
This is most likely an issue with the file format, as above.
but my fault is : my ssh config file set IdentityFile wrong。
right:
IdentityFile ~/.ssh/id_ed25519wrong:IdentityFile ~/.ssh/id_ed25519.pubI also had this problem. Make sure when pasting keys anywhere you don’t have an empty line at the end. This borked my github actions.
nvm the probleme was the key bad format. it working as exept now, i was thinking got another error message before when key as bad format? thx for the help. Regards