git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Possible to use git over custom ssh libraries?

From
Bryan Turner <bturner@atlassian.com>
Date
Mar 5, 2021, 08:30 UTC
Message-ID
<CAGyf7-HuBHC64rL-NBRS_HDD3dbyedV-LKOeP+=k2ZVxpDOLbA@mail.gmail.com>
In-Reply-To
<CANXojczh98ax2KwsaJg4CkusgrUWvhH0yG-u6oSW9nwwMLz_iA@mail.gmail.com>
On Fri, Mar 5, 2021 at 12:14 AM Stef Bon <stefbon@gmail.com> wrote:
Show 10 quoted lines
>
> I'm working on a set of network services using SSH, like SFTP, backup,
> fsnotify, (text/video) chat, connection forwarding using my own SSH
> implementation. See:
>
> https://github.com/stefbon/OSNS
>
> Now I want to also provide support for browsing remote git
> repositories using my ssh libraries, which will provide the transport
> layer.

Git doesn't use any SSH libraries directly, as far as I'm aware. It forks ssh and that does what it does. Git has an ssh.variant/GIT_SSH_VARIANT[1] toggle can be used to tell it a bit about how it should expect ssh to behave so it can assemble the right command line.

That implies you'd need to use your libraries to build at least a minimal ssh command you could configure Git to use. GIT_SSH[2] can be used to tell Git where to find the ssh binary.

Show 7 quoted lines
>
> Is it possible to use git in combination with my own libraries? Or do
> I have to use libgit2 for that or something else?
>
> Thanks in advance,
>
> Stef Bon

Hope this helps! -b

[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-sshvariant [2] https://git-scm.com/docs/git#Documentation/git.txt-codeGITSSHcode

Previous: Stef BonNext: Stef Bon
Message 2 of 4 in “Possible to use git over custom ssh libraries?”
  1. Stef BonMar 5, 2021
  2. Bryan TurnerMar 5, 2021
  3. Stef BonMar 5, 2021
  4. brian m. carlsonMar 5, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.