diff options
| author | Brad Morgan <brad@dmgctrl.com> | 2013-05-03 16:31:16 -0400 |
|---|---|---|
| committer | Brad Morgan <brad@dmgctrl.com> | 2013-05-04 11:28:20 -0400 |
| commit | f7158cd79b836d791b188f67b6d54064afb8ed31 (patch) | |
| tree | 4b01ba9d4c784c52c682b0a1b44551421098d971 /include/git2/transport.h | |
| parent | d04c384036ec6f843bbbb45a87d9d451c35cf29a (diff) | |
| download | libgit2-f7158cd79b836d791b188f67b6d54064afb8ed31.tar.gz | |
Push working over ssh
Diffstat (limited to 'include/git2/transport.h')
| -rw-r--r-- | include/git2/transport.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h index 9b9ecc5fc..31572c16a 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -27,6 +27,7 @@ GIT_BEGIN_DECL typedef enum { /* git_cred_userpass_plaintext */ GIT_CREDTYPE_USERPASS_PLAINTEXT = 1, + GIT_CREDTYPE_SSH_KEYFILE_PASSPHRASE = 2, } git_credtype_t; /* The base structure for all credential types */ @@ -43,6 +44,14 @@ typedef struct git_cred_userpass_plaintext { char *password; } git_cred_userpass_plaintext; +/* A plaintext username and password */ +typedef struct git_cred_ssh_keyfile_passphrase { + git_cred parent; + char *publickey; + char *privatekey; + char *passphrase; +} git_cred_ssh_keyfile_passphrase; + /** * Creates a new plain-text username and password credential object. * The supplied credential parameter will be internally duplicated. @@ -58,6 +67,22 @@ GIT_EXTERN(int) git_cred_userpass_plaintext_new( const char *password); /** + * Creates a new ssh key file and passphrase credential object. + * The supplied credential parameter will be internally duplicated. + * + * @param out The newly created credential object. + * @param publickey The path to the public key of the credential. + * @param privatekey The path to the private key of the credential. + * @param passphrase The passphrase of the credential. + * @return 0 for success or an error code for failure + */ +GIT_EXTERN(int) git_cred_ssh_keyfile_passphrase_new( + git_cred **out, + const char *publickey, + const char *privatekey, + const char *passphrase); + +/** * Signature of a function which acquires a credential object. * * @param cred The newly created credential object. |
