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

Advise on a push only repo

From
Jason Pyeron <jpyeron@pdinc.us>
Date
Jan 15, 2015, 18:02 UTC
Message-ID
<9782FD24F9FA45659CCE5171E73E49E7@black>
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 {
   543          const char *method;
   544          const char *pattern;
   545          void (*imp)(char *);
   546  } services[] = {
   547          {"GET", "/HEAD$", get_head},
   548          {"GET", "/info/refs$", get_info_refs},
   549          {"GET", "/objects/info/alternates$", get_text_file},
   550          {"GET", "/objects/info/http-alternates$", get_text_file},
   551          {"GET", "/objects/info/packs$", get_info_packs},
   552          {"GET", "/objects/[0-9a-f]{2}/[0-9a-f]{38}$", get_loose_object},
   553          {"GET", "/objects/pack/pack-[0-9a-f]{40}\\.pack$", get_pack_file},
   554          {"GET", "/objects/pack/pack-[0-9a-f]{40}\\.idx$", get_idx_file},
   555
   556          {"POST", "/git-upload-pack$", service_rpc},
   557          {"POST", "/git-receive-pack$", service_rpc}
   558  };
I feel I could just filter /git-receive-pack and /objects/ .
I am going to build my test system now.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
Next: Junio C Hamano
Message 1 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.