libgit2

git_credential_username_new

Version:

Create a credential to specify a username.

This is used with ssh authentication to query for the username if none is specified in the url.

Signature

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

Parameters

In
out

The newly created credential object.

const char *
In
username

The username to authenticate with

Returns

int

0 for success or an error code for failure

Versions