MCPcopy Create free account
hub / github.com/libgit2/git2go / registerManagedSSH

Function registerManagedSSH

ssh.go:35–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35func registerManagedSSH() error {
36 globalRegisteredSmartTransports.Lock()
37 defer globalRegisteredSmartTransports.Unlock()
38
39 for _, protocol := range []string{"ssh", "ssh+git", "git+ssh"} {
40 if _, ok := globalRegisteredSmartTransports.transports[protocol]; ok {
41 continue
42 }
43 managed, err := newRegisteredSmartTransport(protocol, false, sshSmartSubtransportFactory, true)
44 if err != nil {
45 return fmt.Errorf("failed to register transport for %q: %v", protocol, err)
46 }
47 globalRegisteredSmartTransports.transports[protocol] = managed
48 }
49 return nil
50}
51
52func sshSmartSubtransportFactory(remote *Remote, transport *Transport) (SmartSubtransport, error) {
53 return &sshSmartSubtransport{

Callers 1

initLibGit2Function · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…