Код: Выделить всё
var co = new CloneOptions();
co.CredentialsProvider = (_url, _user, _cred) => new SshUserKeyCredentials { PrivateKey="C:\\path\\to\\private_key" };
Repository.Clone("git@... .repository.git", path, co);
Похоже, что объекту требуется любая комбинация PrivateKey, Username, PublicKey и Passphrase. В настоящее время я использую PrivateKey.
В результате у меня возникает ошибка:
Код: Выделить всё
{"Failed to start SSH session: Unable to exchange encryption keys"}
Подробнее здесь: https://stackoverflow.com/questions/413 ... 2sharp-ssh