git_credential_ssh_custom_new

Create an ssh key credential with a custom signing function.

This lets you use your own function to sign the challenge.

This function and its credential type is provided for completeness and wraps libssh2_userauth_publickey(), which is undocumented.

The supplied credential parameter will be internally duplicated.

extern (C) nothrow @nogc
int
git_credential_ssh_custom_new

Parameters

out_ .git_credential**

The newly created credential object.

username const(char)*

username to use to authenticate

publickey const(char)*

The bytes of the public key.

publickey_len size_t

The length of the public key in bytes.

sign_callback .git_credential_sign_cb

The callback method to sign the data during the challenge.

payload void*

Additional data to pass to the callback.

Return Value

Type: int

0 for success or an error code for failure

Meta