summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2013-11-20 14:20:32 +0100
committerAlessandro Ghedini <alessandro@ghedini.me>2013-11-20 14:25:55 +0100
commit138e014c389a750715cf4f60cceef96692b4ea51 (patch)
treec08a1c8fbaab807ae3af00a186ee98d94a989c24 /include/git2
parentee7040fd9b056ef61c538717c11c3eab48d86ac5 (diff)
downloadlibgit2-138e014c389a750715cf4f60cceef96692b4ea51.tar.gz
transport: document ssh-agent authentication
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/transport.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h
index caabd0465..039321088 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -131,6 +131,18 @@ GIT_EXTERN(int) git_cred_ssh_key_new(
const char *passphrase);
/**
+ * Create a new ssh key credential object used for querying an ssh-agent.
+ * The supplied credential parameter will be internally duplicated.
+ *
+ * @param out The newly created credential object.
+ * @param username username to use to authenticate
+ * @return 0 for success or an error code for failure
+ */
+GIT_EXTERN(int) git_cred_ssh_key_from_agent(
+ git_cred **out,
+ const char *username);
+
+/**
* Create an ssh key credential with a custom signing function.
*
* This lets you use your own function to sign the challenge.