2 .\" Title: git-upload-pack
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
7 .\" Source: Git 2.47.0.72.gef8ce8f3d4
10 .TH "GIT\-UPLOAD\-PACK" "1" "2024-10-10" "Git 2\&.47\&.0\&.72\&.gef8ce8f" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-upload-pack \- Send objects packed back to git\-fetch\-pack
35 \fIgit\-upload\-pack\fR [\-\-[no\-]strict] [\-\-timeout=<n>] [\-\-stateless\-rpc]
36 [\-\-advertise\-refs] <directory>
40 Invoked by \fIgit fetch\-pack\fR, learns what objects the other side is missing, and sends them after packing\&.
42 This command is usually not invoked directly by the end user\&. The UI for the protocol is on the \fIgit fetch\-pack\fR side, and the program pair is meant to be used to pull updates from a remote repository\&. For push operations, see \fIgit send\-pack\fR\&.
47 Do not try <directory>/\&.git/ if <directory> is not a Git directory\&.
52 Interrupt transfer after <n> seconds of inactivity\&.
57 Perform only a single read\-write cycle with stdin and stdout\&. This fits with the HTTP POST request processing model where a program may read the request, write a response, and must exit\&.
60 \-\-http\-backend\-info\-refs
63 \fBgit-http-backend\fR(1)
65 \fB$GIT_URL/info/refs\fR?service=git\-upload\-pack requests\&. See "Smart Clients" in
66 \fBgitprotocol-http\fR(5)
67 and "HTTP Transport" in the
68 \fBgitprotocol-v2\fR(5)
69 documentation\&. Also understood by
70 \fBgit-receive-pack\fR(1)\&.
75 The repository to sync from\&.
81 Internal variable used for handshaking the wire protocol\&. Server admins may need to configure some transports to allow this variable to be passed\&. See the discussion in
85 \fBGIT_NO_LAZY_FETCH\fR
87 When cloning or fetching from a partial repository (i\&.e\&., one itself cloned with
88 \fB\-\-filter\fR), the server\-side
90 may need to fetch extra objects from its upstream in order to complete the request\&. By default,
92 will refuse to perform such a lazy fetch, because
95 may run arbitrary commands specified in configuration and hooks of the source repository (and
97 tries to be safe to run even in untrusted \&.\fBgit\fR
100 This is implemented by having
103 \fBGIT_NO_LAZY_FETCH\fR
105 \fB1\fR\&. If you want to override it (because you are fetching from a partial clone, and you are sure you trust it), you can explicitly set
106 \fBGIT_NO_LAZY_FETCH\fR
112 Most Git commands should not be run in an untrusted \&.\fBgit\fR directory (see the section \fBSECURITY\fR in \fBgit\fR(1))\&. \fBupload\-pack\fR tries to avoid any dangerous configuration options or hooks from the repository it\(cqs serving, making it safe to clone an untrusted directory and run commands on the resulting clone\&.
114 For an extra level of safety, you may be able to run \fBupload\-pack\fR as an alternate user\&. The details will be platform dependent, but on many systems you can run:
120 git clone \-\-no\-local \-\-upload\-pack=\*(Aqsudo \-u nobody git\-upload\-pack\*(Aq \&.\&.\&.
127 \fBgitnamespaces\fR(7)
130 Part of the \fBgit\fR(1) suite