libgit2

git_credential_ssh_key_from_agent

Version:

Create a new ssh key credential object used for querying an ssh-agent. The supplied credential parameter will be internally duplicated.

Signature

int git_credential_ssh_key_from_agent(git_credential **out, const char *username);

Parameters

In
out

The newly created credential object.

const char *
In
username

username to use to authenticate

Returns

int

0 for success or an error code for failure

Versions