libgit2

git_cred_ssh_key_new

Version:

Create a new passphrase-protected ssh key credential object. The supplied credential parameter will be internally duplicated.

Signature

int git_cred_ssh_key_new(git_cred **out, const char *username, const char *publickey, const char *privatekey, const char *passphrase);

Parameters

In
out

The newly created credential object.

const char *
In
username

username to use to authenticate

const char *
In
publickey

The path to the public key of the credential.

const char *
In
privatekey

The path to the private key of the credential.

const char *
In
passphrase

The passphrase of the credential.

Returns

int

0 for success or an error code for failure

Versions