summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2021-09-05 17:04:40 -0700
committerGitHub <[email protected]>2021-09-05 17:04:40 -0700
commit70e5e419cf0cab31553b106267a0296f3cd672d9 (patch)
treeb8bed08c5cc6236e542f09c18d3823e34e161968 /git.go
parentb983e1daebf528443e2a3954cd595fa3664ec93f (diff)
Add support for managed SSH transport #minor (#814)
This change drops the (hard) dependency on libssh2 and instead uses Go's implementation of SSH when libgit2 is not built with it.
Diffstat (limited to 'git.go')
-rw-r--r--git.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/git.go b/git.go
index 9ad1ffc..62cf5d9 100644
--- a/git.go
+++ b/git.go
@@ -161,6 +161,11 @@ func initLibGit2() {
// they're the only ones setting it up.
C.git_openssl_set_locking()
}
+ if features&FeatureSSH == 0 {
+ if err := registerManagedSSH(); err != nil {
+ panic(err)
+ }
+ }
}
// Shutdown frees all the resources acquired by libgit2. Make sure no