Subject: Re: Advise on a push only repo

From: Junio C Hamano <[email-masked]>
Date: Thu, 15 Jan 2015 11:31:00 -0800

"Jason Pyeron" <[email-masked]> writes:

> I am setting up a continous integration (CI) system for an open source
> project and I want to allow forking developers to use the system, but
> I do not want anyone to do a clone or fetch from the CI git repo, the
> repo.
>
> Any advice on limiting the https smart protocol to push only, blocking clone and fetch?
>
> Looking at http-backend.c
>    542  static struct service_cmd {
> ...
>    558  };

Looking at http-backend.c

     19 struct rpc_service {
     20         const char *name;
     21         const char *config_name;
     22         signed enabled : 2;
     23 };
     24 
     25 static struct rpc_service rpc_service[] = {
     26         { "upload-pack", "uploadpack", 1 },
     27         { "receive-pack", "receivepack", -1 },
     28 };

So it would be natural to assume that there must be a way to
enable/disable these two services, no?

Looking at http_config() there, I would guess perhaps:

    [http]
        uploadpack = false
        getanyfile = false

but I am not sure if the latter is needed (or anybody seriously
tested it, for that matter).