I´m kind of stuck with an SSH private key issue and LibGit2Sharp-Ssh.
I have a .Net/C# application that uses LibGit2Sharp-Ssh to clone a Git repository.
I ne
privateKey point to a private key file in "OpenSSH" format.
privateKey
needs to point to a key, not a path to a key. You need to read the key file and place the contents into a string
that you can pass to privateKey
.
That´s how my OpenSSH-Key looks like (key data truncated):
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,27A4E70608469318
<Key-Data, like "sdhsdcQEHBg3uzfb...">
-----END RSA PRIVATE KEY-----
Is there some way i can verify tha exported key?
Instead of creating your private key with PuttyGen (ppk
keys), Use PuttyGen to load said ppk
file, and save it as OpenSSH file (id_rsa
, id_rsa.pub
)
Or, as I described here, use Git for Windows PATH to access ssh-keygen, and create one directly with the right format:
ssh-keygen -t rsa -C "key for my Git repo server" -q -P ""