libgit2

git_cred_acquire_cb

Version:

Signature of a function which acquires a credential object.

Signature

typedef int git_cred_acquire_cb(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *payload);

Parameters

In
cred

The newly created credential object.

const char *
In
url

The resource for which we are demanding a credential.

const char *
In
username_from_url

The username that was embedded in a "user@host" remote url, or NULL if not included.

unsigned int
In
allowed_types

A bitmask stating which cred types are OK to return.

void *
In
payload

The payload provided when specifying this callback.

Returns

int

0 for success, < 0 to indicate an error, > 0 to indicate no credential was acquired

Versions