9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* git/serve, git/compat
@ 2020-09-06 21:46 ori
  2020-09-07  3:40 ` [9fans] " Lucio De Re
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: ori @ 2020-09-06 21:46 UTC (permalink / raw)
  To: 9front, 9fans

Hey,

I try not to be too verbose about new features landing in git9, but
I think these warrant some  noise. Both git/compat and git/serve
have landed in the last few days.

Git/compat is a script that drops you into a new rc shell with
a 'git' script in $path. This git script provides enough of the
upstream git interface that 'go get' and friends work out of the
box, as long as you're in a git repository. Thanks to halfwit
for doing the work on this!

	% git/compat
	nested% cd $gorepo
	nested% go get ./...

Git/serve is exactly what it sounds like: A git server that runs
on plan 9. It supports both read-only and read-write access.

	# read-only git://$host server, works with git 
	% aux/listen1 'tcp!*!9418' git/serve

Once that's running, you can clone from it using any git client
that supports the git:// protocol

	unix$ git clone git://host/path/to/repo.git
	p9% git/clone git://host.com/path/to/repo

You can also tunnel it over TLS with plan 9 auth, if you want
authenticated pushes:

	% aux/listen1 -t 'tcp!*!9418' tlsclient -a git/serve -wr`{pwd}

With this, you currently need a plan 9 git client, since unix
git doesn't know how to tunnel over tlsclient or authenticate
with an auth server:

	p9% git/clone hjgit://host.com/path/to/repo

But we can probably get a simple remote helper for unix git that
will dial using a plan9port copy of tlsclient:

	https://rovaughn.github.io/2015-2-9.html

There are still rough edges:

Git/compat only works under a git repository. There are some
commands that 'go get' invokes when run outside of a repository
that need some work.

Git/serve does not currently support bare repositories, so
all repositories served must have a '.git' directory inside
them:

	% ls /usr/ori/srv/git9
	.git/

It's acceptably fast for small repositories, but there's a lot
of low hanging fruit to pick. And of course, it's only been
tested rather lightly.


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

end of thread, other threads:[~2020-09-10  1:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06 21:46 git/serve, git/compat ori
2020-09-07  3:40 ` [9fans] " Lucio De Re
2020-09-07  3:40   ` Lucio De Re
2020-09-07  4:53 ` [9front] " Jens Staal
2020-09-10  1:35 ` [9fans] " ori

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 NNTP newsgroup(s).