How to authenticate dulwich to private repos?

45 views
Skip to first unread message

Nathan Menge

unread,
Jul 19, 2017, 11:12:14 AM7/19/17
to dulwich-discuss
Hello,
     I am looking to use Dulwich as part of a tool that will do automated updates to repos.  I am assuming that somewhere under the hood, Dulwich uses my ssh keys to access private repos, but I haven't been able to find anyting that lets me configure where the keys are, or alternate means of authentication.

    Could someone clarify how that all works to me?

    Thanks!

Jelmer Vernooij

unread,
Jul 19, 2017, 6:12:15 PM7/19/17
to Nathan Menge, dulwich-discuss
Hi Nathan,

The Dulwich SSH client implementation lives in
dulwich.client.SSHGitClient. At the moment it supports two different
mechanisms for calling out to SSH:

* via subprocess ("dulwich.client.SubprocessSSHVendor"). This simply
invokes ssh with a username/host, possibly a port, and a command.
* via paramiko; there is a contributed paramiko wrapper in
dulwich.contrib.paramiko_vendor - https://github.com/paramiko/paramiko

To override the default behaviour for invoking "ssh", you could make a
copy of SubprocessSSHVendor and tweak it to pass different arguments
and set dulwich.client.get_ssh_vendor to your new class.

Hope this helps,

Jelmer
> --
> You received this message because you are subscribed to the Google Groups
> "dulwich-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dulwich-discu...@googlegroups.com.
> To post to this group, send email to dulwich...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/dulwich-discuss/83a485ac-1709-41b6-855d-e93e9e674c45%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages