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

Re: Advise on a push only repo

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 15, 2015, 19:31 UTC
Message-ID
<xmqqa91j7sej.fsf@gitster.dls.corp.google.com>
In-Reply-To
<9782FD24F9FA45659CCE5171E73E49E7@black>
"Jason Pyeron" <jpyeron@pdinc.us> writes:
Show 11 quoted lines
> 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).

Previous: Jason PyeronNext: Jason Pyeron
Message 2 of 4 in “Advise on a push only repo”
  1. Jason PyeronJan 15, 2015
  2. Junio C HamanoJan 15, 2015
  3. Jason PyeronJan 15, 2015
  4. Junio C HamanoJan 15, 2015

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.