You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That libgit2 version has a bug where it will try to call the callback to get authentication information regardless of whether it's set, which means not setting it will cause a segfault.
So I have been looking at trying to clone using SSH as well, but I cannot figure out how to get pygit2 to use public key authentication. Does anyone have an example python code snippet for clone_repository using SSH and public key authentication?
@amackera The segfault is due to problems in libgit2 where it doesnt parse the string correctly, in the current master branch. I just submitted a PR to pygit2 that adds full public key support to pygit2, where you specify the SSH keypair to use. See #282 for more info.
But the fast fix to the segfault is to use this format instead for the repo url: ssh://github.com/bunjiboys/pygit2.git as this format is parsed correctly.
Activity
carlosmn commentedon Sep 25, 2013
That libgit2 version has a bug where it will try to call the callback to get authentication information regardless of whether it's set, which means not setting it will cause a segfault.
amackera commentedon Sep 25, 2013
@carlosmn Interesting. When you say "authentication information", what do you mean specifically?
carlosmn commentedon Sep 25, 2013
Either a username-password or username-public/private-key combination, which you always need when talking to ssh.
bunjiboys commentedon Oct 24, 2013
So I have been looking at trying to clone using SSH as well, but I cannot figure out how to get pygit2 to use public key authentication. Does anyone have an example python code snippet for clone_repository using SSH and public key authentication?
bunjiboys commentedon Oct 31, 2013
@amackera The segfault is due to problems in libgit2 where it doesnt parse the string correctly, in the current master branch. I just submitted a PR to pygit2 that adds full public key support to pygit2, where you specify the SSH keypair to use. See #282 for more info.
But the fast fix to the segfault is to use this format instead for the repo url:
ssh://github.com/bunjiboys/pygit2.gitas this format is parsed correctly.carlosmn commentedon Mar 31, 2014
The fixed version of the library has been available for some time.
hexaJer commentedon Apr 10, 2014
I do not find how use it.
I built successfully libgit2 (libgit2/libgit2@bcc6229) and pygit2 (d882af8) and I tried :
did I forget something?
carlosmn commentedon Apr 10, 2014
Libgit2 needs to be build with ssh support. That is, it needs to find the openssh2 library headers and pkg-config info at build-time.
hexaJer commentedon Apr 11, 2014
okay I had not seen !
Thanks !