libgit2

git_cred_userpass

Version:

Stock callback usable as a git_cred_acquire_cb. This calls git_cred_userpass_plaintext_new unless the protocol has not specified GIT_CREDTYPE_USERPASS_PLAINTEXT as an allowed type.

Signature

int git_cred_userpass(git_cred **cred, const char *url, const char *user_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
user_from_url
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. (This is interpreted as a git_cred_userpass_payload*.)

Returns

int

Versions