git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Possible to use git over custom ssh libraries?
@ 2021-03-05  8:13 Stef Bon
  2021-03-05  8:30 ` Bryan Turner
  0 siblings, 1 reply; 4+ messages in thread
From: Stef Bon @ 2021-03-05  8:13 UTC (permalink / raw)
  To: git

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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible to use git over custom ssh libraries?
  2021-03-05  8:13 Possible to use git over custom ssh libraries? Stef Bon
@ 2021-03-05  8:30 ` Bryan Turner
  2021-03-05 14:22   ` Stef Bon
  0 siblings, 1 reply; 4+ messages in thread
From: Bryan Turner @ 2021-03-05  8:30 UTC (permalink / raw)
  To: Stef Bon; +Cc: Git Users

On Fri, Mar 5, 2021 at 12:14 AM Stef Bon <stefbon@gmail.com> wrote:
>
> 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.

>
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible to use git over custom ssh libraries?
  2021-03-05  8:30 ` Bryan Turner
@ 2021-03-05 14:22   ` Stef Bon
  2021-03-05 21:53     ` brian m. carlson
  0 siblings, 1 reply; 4+ messages in thread
From: Stef Bon @ 2021-03-05 14:22 UTC (permalink / raw)
  To: Bryan Turner; +Cc: Git Users

Hi Bryan,

thanks for your reaction. Git itself can thus deal with a different
ssh implementation, only I cannot use that for
my fuse fs. I need I library which "talks" git.

What is libgit2 in this context? Is it a library which uses the git
internals, or is git self written in libgit2?
And can I use that to use custom ssh libraries and build a fuse fs with it?

Stef

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible to use git over custom ssh libraries?
  2021-03-05 14:22   ` Stef Bon
@ 2021-03-05 21:53     ` brian m. carlson
  0 siblings, 0 replies; 4+ messages in thread
From: brian m. carlson @ 2021-03-05 21:53 UTC (permalink / raw)
  To: Stef Bon; +Cc: Bryan Turner, Git Users

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

On 2021-03-05 at 14:22:42, Stef Bon wrote:
> Hi Bryan,
> 
> thanks for your reaction. Git itself can thus deal with a different
> ssh implementation, only I cannot use that for
> my fuse fs. I need I library which "talks" git.
> 
> What is libgit2 in this context? Is it a library which uses the git
> internals, or is git self written in libgit2?
> And can I use that to use custom ssh libraries and build a fuse fs with it?

libgit2 is an independent implementation of Git as a library.  Git and
libgit2 generally don't share code, although some code has been copied
from one to the other.  It supports SSH using libssh2, although you
could probably patch it to use a different library.

That's the only general purpose C-compatible implementation of Git as a
library that I'm aware of.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-05 21:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  8:13 Possible to use git over custom ssh libraries? Stef Bon
2021-03-05  8:30 ` Bryan Turner
2021-03-05 14:22   ` Stef Bon
2021-03-05 21:53     ` brian m. carlson

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).