{"thread":{"id":"55260","subject":"Possible to use git over custom ssh libraries?","startedAt":"2021-03-05T08:14:13Z","lastAt":"2021-03-05T21:54:34Z","messageCount":4,"participants":["Stef Bon","Bryan Turner","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"418301","messageId":"CANXojczh98ax2KwsaJg4CkusgrUWvhH0yG-u6oSW9nwwMLz_iA@mail.gmail.com","threadId":"55260","inReplyTo":null,"subject":"Possible to use git over custom ssh libraries?","fromName":"Stef Bon","fromEmail":"stefbon@gmail.com","sentAt":"2021-03-05T08:13:58Z","receivedAt":"2021-03-05T08:14:13Z","isPatch":false,"sender":{"key":"stefbon@gmail.com","avatar":null},"body":"I'm working on a set of network services using SSH, like SFTP, backup,\nfsnotify, (text/video) chat, connection forwarding using my own SSH\nimplementation. See:\n\nhttps://github.com/stefbon/OSNS\n\nNow I want to also provide support for browsing remote git\nrepositories using my ssh libraries, which will provide the transport\nlayer.\n\nIs it possible to use git in combination with my own libraries? Or do\nI have to use libgit2 for that or something else?\n\nThanks in advance,\n\nStef Bon\n"},{"id":"418304","messageId":"CAGyf7-HuBHC64rL-NBRS_HDD3dbyedV-LKOeP+=k2ZVxpDOLbA@mail.gmail.com","threadId":"55260","inReplyTo":"CANXojczh98ax2KwsaJg4CkusgrUWvhH0yG-u6oSW9nwwMLz_iA@mail.gmail.com","subject":"Re: Possible to use git over custom ssh libraries?","fromName":"Bryan Turner","fromEmail":"bturner@atlassian.com","sentAt":"2021-03-05T08:30:00Z","receivedAt":"2021-03-05T08:31:05Z","isPatch":false,"sender":{"key":"bturner@atlassian.com","avatar":"https://gravatar.com/avatar/16bcf3167981c1ef7c804e502642366d888a35b0d0b0a4ca01fdc442aa1acb1e?d=mp&s=160"},"body":"On Fri, Mar 5, 2021 at 12:14 AM Stef Bon <stefbon@gmail.com> wrote:\n>\n> I'm working on a set of network services using SSH, like SFTP, backup,\n> fsnotify, (text/video) chat, connection forwarding using my own SSH\n> implementation. See:\n>\n> https://github.com/stefbon/OSNS\n>\n> Now I want to also provide support for browsing remote git\n> repositories using my ssh libraries, which will provide the transport\n> layer.\n\nGit doesn't use any SSH libraries directly, as far as I'm aware. It\nforks ssh and that does what it does. Git has an\nssh.variant/GIT_SSH_VARIANT[1] toggle can be used to tell it a bit\nabout how it should expect ssh to behave so it can assemble the right\ncommand line.\n\nThat implies you'd need to use your libraries to build at least a\nminimal ssh command you could configure Git to use. GIT_SSH[2] can be\nused to tell Git where to find the ssh binary.\n\n>\n> Is it possible to use git in combination with my own libraries? Or do\n> I have to use libgit2 for that or something else?\n>\n> Thanks in advance,\n>\n> Stef Bon\n\nHope this helps!\n-b\n\n[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-sshvariant\n[2] https://git-scm.com/docs/git#Documentation/git.txt-codeGITSSHcode\n"},{"id":"418312","messageId":"CANXojcymWsK4g7s5rx0_OPu_XSf4ZiKUbYgQ-h38cvF5WYQs=g@mail.gmail.com","threadId":"55260","inReplyTo":"CAGyf7-HuBHC64rL-NBRS_HDD3dbyedV-LKOeP+=k2ZVxpDOLbA@mail.gmail.com","subject":"Re: Possible to use git over custom ssh libraries?","fromName":"Stef Bon","fromEmail":"stefbon@gmail.com","sentAt":"2021-03-05T14:22:42Z","receivedAt":"2021-03-05T14:24:02Z","isPatch":false,"sender":{"key":"stefbon@gmail.com","avatar":null},"body":"Hi Bryan,\n\nthanks for your reaction. Git itself can thus deal with a different\nssh implementation, only I cannot use that for\nmy fuse fs. I need I library which \"talks\" git.\n\nWhat is libgit2 in this context? Is it a library which uses the git\ninternals, or is git self written in libgit2?\nAnd can I use that to use custom ssh libraries and build a fuse fs with it?\n\nStef\n"},{"id":"418348","messageId":"YEKoav/IOp4Mpe4H@camp.crustytoothpaste.net","threadId":"55260","inReplyTo":"CANXojcymWsK4g7s5rx0_OPu_XSf4ZiKUbYgQ-h38cvF5WYQs=g@mail.gmail.com","subject":"Re: Possible to use git over custom ssh libraries?","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2021-03-05T21:53:46Z","receivedAt":"2021-03-05T21:54:34Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2021-03-05 at 14:22:42, Stef Bon wrote:\n> Hi Bryan,\n> \n> thanks for your reaction. Git itself can thus deal with a different\n> ssh implementation, only I cannot use that for\n> my fuse fs. I need I library which \"talks\" git.\n> \n> What is libgit2 in this context? Is it a library which uses the git\n> internals, or is git self written in libgit2?\n> And can I use that to use custom ssh libraries and build a fuse fs with it?\n\nlibgit2 is an independent implementation of Git as a library.  Git and\nlibgit2 generally don't share code, although some code has been copied\nfrom one to the other.  It supports SSH using libssh2, although you\ncould probably patch it to use a different library.\n\nThat's the only general purpose C-compatible implementation of Git as a\nlibrary that I'm aware of.\n-- \nbrian m. carlson (he/him or they/them)\nHouston, Texas, US\n"}]}