# Git Daemon Dummy: 301 Redirects for git:// to https://

7 messages from 2016-02-23 to 2016-02-23. Participants: Jason A. Donenfeld, Jeff King, John Keeping, Duy Nguyen.
Thread: https://gitlist.dev/t/41478

## Jason A. Donenfeld, 2016-02-23 02:32

Subject: Git Daemon Dummy: 301 Redirects for git:// to https://
Message-ID: <CAHmME9rTpGNHMKbXD48oBYm136=u79YiHjX5hm8ZYC4xSThJsA@mail.gmail.com>
URL: https://gitlist.dev/e/CAHmME9rTpGNHMKbXD48oBYm136%3Du79YiHjX5hm8ZYC4xSThJsA%40mail.gmail.com

```
Hi folks,

In case anyone else finds this useful, I wrote this:

https://git.zx2c4.com/git-daemon-dummy/about/

It's an epoll-based responder for git:// that simply returns an error
telling users of a new URI. The purpose is to phase out git-daemon in
favor of more secure TLS/HTTPS endpoints. With HTTPS certificates now
being free, seems like this could be useful.

My personal motivation is that I'd like to just totally kill the
git-daemon service, but somebody hard coded a URI of mine into a real
printed textbook [1], so I don't want it to go stale suddenly. So, I
need some way of informing users of the new URI.

Let me know what you think.

Jason



[1] https://books.google.fr/books?id=kJsQAwAAQBAJ&pg=PA314&lpg=PA314&dq=git://git.zx2c4.com&source=bl&ots=W6M9TlYzCY&sig=g-PY0glN2ddWygtFDLiHgbiC69I&hl=en&sa=X&redir_esc=y#v=onepage&q=git%3A%2F%2Fgit.zx2c4.com&f=false

```

## Jeff King, 2016-02-23 06:15

Subject: Re: Git Daemon Dummy: 301 Redirects for git:// to https://
Message-ID: <20160223061517.GA3252@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20160223061517.GA3252%40sigill.intra.peff.net
In-Reply-To: <CAHmME9rTpGNHMKbXD48oBYm136=u79YiHjX5hm8ZYC4xSThJsA@mail.gmail.com>

```
On Tue, Feb 23, 2016 at 03:32:02AM +0100, Jason A. Donenfeld wrote:

> In case anyone else finds this useful, I wrote this:
> 
> https://git.zx2c4.com/git-daemon-dummy/about/
> 
> It's an epoll-based responder for git:// that simply returns an error
> telling users of a new URI.

Neat.

> The purpose is to phase out git-daemon in
> favor of more secure TLS/HTTPS endpoints. With HTTPS certificates now
> being free, seems like this could be useful.

Yeah, the existence of HTTPS (and the fact that the same URL can be both
anonymous and authenticated) is nice. Unfortunately, git-over-https is
not as efficient as the other protocols, because it's not asynchronously
bi-directional. It would probably be relatively simple to make a
"gits://" protocol, but I think it would be more interesting still if we
could do git-over-websockets, to get the ubiquity benefits of HTTP.

I looked into it once, but was unable to find any reasonably sized
explanation of how to implement either the server or client side of
websockets. :)

> My personal motivation is that I'd like to just totally kill the
> git-daemon service, but somebody hard coded a URI of mine into a real
> printed textbook [1], so I don't want it to go stale suddenly. So, I
> need some way of informing users of the new URI.

Darn printed books. I thought the Ministry of Truth was supposed to take
care of keeping our facts up to date.

-Peff

```

## John Keeping, 2016-02-23 10:51

Subject: Re: Git Daemon Dummy: 301 Redirects for git:// to https://
Message-ID: <20160223105159.GJ1766@serenity.lan>
URL: https://gitlist.dev/e/20160223105159.GJ1766%40serenity.lan
In-Reply-To: <CAHmME9rTpGNHMKbXD48oBYm136=u79YiHjX5hm8ZYC4xSThJsA@mail.gmail.com>

```
On Tue, Feb 23, 2016 at 03:32:02AM +0100, Jason A. Donenfeld wrote:
> In case anyone else finds this useful, I wrote this:
> 
> https://git.zx2c4.com/git-daemon-dummy/about/
> 
> It's an epoll-based responder for git:// that simply returns an error
> telling users of a new URI. The purpose is to phase out git-daemon in
> favor of more secure TLS/HTTPS endpoints. With HTTPS certificates now
> being free, seems like this could be useful.
> 
> My personal motivation is that I'd like to just totally kill the
> git-daemon service, but somebody hard coded a URI of mine into a real
> printed textbook [1], so I don't want it to go stale suddenly. So, I
> need some way of informing users of the new URI.
> 
> Let me know what you think.

There's no license specified in the repo, it just says "All rights
reserved" in the .c file.  I'm sure you intend it to be open source, but
it isn't unless a license is specified.

```

## Duy Nguyen, 2016-02-23 12:13

Subject: Re: Git Daemon Dummy: 301 Redirects for git:// to https://
Message-ID: <CACsJy8D1H6k2FJOHQnT3BEnpXDPn8+ux-vJfDLMhO-JybFvR=w@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8D1H6k2FJOHQnT3BEnpXDPn8%2Bux-vJfDLMhO-JybFvR%3Dw%40mail.gmail.com
In-Reply-To: <20160223061517.GA3252@sigill.intra.peff.net>

```
On Tue, Feb 23, 2016 at 1:15 PM, Jeff King <peff@peff.net> wrote:
> I looked into it once, but was unable to find any reasonably sized
> explanation of how to implement either the server or client side of
> websockets. :)

Wikipedia explained handshake in four paragraphs. Then you only have
to chew about ten pages of RFC6455, from page 27 to master data frames
(and we probably just need binary frames for pkt-line, or fragmented
when sending the pack). Come on, give us git+ws:// :D

PS. Too bad I couldn't find any minimal library that just deals with
websocket data frame handling. I suppose curl can deal with handshake
just fine.
-- 
Duy

```

## Jason A. Donenfeld, 2016-02-23 15:10

Subject: Re: Git Daemon Dummy: 301 Redirects for git:// to https://
Message-ID: <CAHmME9qeSEzgw9k8u53O+oCks-dqvfeX_6eXGwCbWD9866sjCg@mail.gmail.com>
URL: https://gitlist.dev/e/CAHmME9qeSEzgw9k8u53O%2BoCks-dqvfeX_6eXGwCbWD9866sjCg%40mail.gmail.com
In-Reply-To: <20160223105159.GJ1766@serenity.lan>

```
On Tue, Feb 23, 2016 at 11:51 AM, John Keeping <john@keeping.me.uk> wrote:
> On Tue, Feb 23, 2016 at 03:32:02AM +0100, Jason A. Donenfeld wrote:
> There's no license specified in the repo, it just says "All rights
> reserved" in the .c file.  I'm sure you intend it to be open source, but
> it isn't unless a license is specified.

https://git.zx2c4.com/git-daemon-dummy/commit/?id=a7ebbf5ab63cb2e95c38a58197cd2805a2deb56f

There you go.

```

## Jason A. Donenfeld, 2016-02-23 15:11

Subject: Re: Git Daemon Dummy: 301 Redirects for git:// to https://
Message-ID: <CAHmME9pVuo+Wub3=DuY-4Zy0Gjm1qM6empt3vvx9JcarF-rbcA@mail.gmail.com>
URL: https://gitlist.dev/e/CAHmME9pVuo%2BWub3%3DDuY-4Zy0Gjm1qM6empt3vvx9JcarF-rbcA%40mail.gmail.com
In-Reply-To: <20160223061517.GA3252@sigill.intra.peff.net>

```
On Tue, Feb 23, 2016 at 7:15 AM, Jeff King <peff@peff.net> wrote:
>
> Yeah, the existence of HTTPS (and the fact that the same URL can be both
> anonymous and authenticated) is nice. Unfortunately, git-over-https is
> not as efficient as the other protocols, because it's not asynchronously
> bi-directional. It would probably be relatively simple to make a
> "gits://" protocol, but I think it would be more interesting still if we
> could do git-over-websockets, to get the ubiquity benefits of HTTP.

That's interesting. I didn't realize that even the smart protocol was
not as efficient as HTTP, but that makes sense. git+ws:// would indeed
be quite nice!

> Darn printed books. I thought the Ministry of Truth was supposed to take
> care of keeping our facts up to date.

:-P

```

## Jason A. Donenfeld, 2016-02-23 15:11

Subject: Re: Git Daemon Dummy: 301 Redirects for git:// to https://
Message-ID: <CAHmME9qdK-NQ7Kz3JmH5PDwU9JnCG=TC1ipCisd0qffTMwAxYA@mail.gmail.com>
URL: https://gitlist.dev/e/CAHmME9qdK-NQ7Kz3JmH5PDwU9JnCG%3DTC1ipCisd0qffTMwAxYA%40mail.gmail.com
In-Reply-To: <CAHmME9pVuo+Wub3=DuY-4Zy0Gjm1qM6empt3vvx9JcarF-rbcA@mail.gmail.com>

```
On Tue, Feb 23, 2016 at 4:11 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> That's interesting. I didn't realize that even the smart protocol was
> not as efficient as HTTP

Can't type today. *as efficient as git://

```
