logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

git-upload-pack.1 (4530B)


  1. '\" t
  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/>
  5. .\" Date: 2025-03-14
  6. .\" Manual: Git Manual
  7. .\" Source: Git 2.49.0
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-UPLOAD\-PACK" "1" "2025-03-14" "Git 2\&.49\&.0" "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. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. git-upload-pack \- Send objects packed back to git\-fetch\-pack
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit\-upload\-pack\fR [\-\-[no\-]strict] [\-\-timeout=<n>] [\-\-stateless\-rpc]
  36. [\-\-advertise\-refs] <directory>
  37. .fi
  38. .SH "DESCRIPTION"
  39. .sp
  40. Invoked by \fIgit fetch\-pack\fR, learns what objects the other side is missing, and sends them after packing\&.
  41. .sp
  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\&.
  43. .SH "OPTIONS"
  44. .PP
  45. \-\-[no\-]strict
  46. .RS 4
  47. Do not try <directory>/\&.git/ if <directory> is not a Git directory\&.
  48. .RE
  49. .PP
  50. \-\-timeout=<n>
  51. .RS 4
  52. Interrupt transfer after <n> seconds of inactivity\&.
  53. .RE
  54. .PP
  55. \-\-stateless\-rpc
  56. .RS 4
  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\&.
  58. .RE
  59. .PP
  60. \-\-http\-backend\-info\-refs
  61. .RS 4
  62. Used by
  63. \fBgit-http-backend\fR(1)
  64. to serve up
  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)\&.
  71. .RE
  72. .PP
  73. <directory>
  74. .RS 4
  75. The repository to sync from\&.
  76. .RE
  77. .SH "ENVIRONMENT"
  78. .PP
  79. \fBGIT_PROTOCOL\fR
  80. .RS 4
  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
  82. \fBgit\fR(1)\&.
  83. .RE
  84. .PP
  85. \fBGIT_NO_LAZY_FETCH\fR
  86. .RS 4
  87. When cloning or fetching from a partial repository (i\&.e\&., one itself cloned with
  88. \fB\-\-filter\fR), the server\-side
  89. \fBupload\-pack\fR
  90. may need to fetch extra objects from its upstream in order to complete the request\&. By default,
  91. \fBupload\-pack\fR
  92. will refuse to perform such a lazy fetch, because
  93. \fBgit\fR
  94. \fBfetch\fR
  95. may run arbitrary commands specified in configuration and hooks of the source repository (and
  96. \fBupload\-pack\fR
  97. tries to be safe to run even in untrusted \&.\fBgit\fR
  98. directories)\&.
  99. .sp
  100. This is implemented by having
  101. \fBupload\-pack\fR
  102. internally set the
  103. \fBGIT_NO_LAZY_FETCH\fR
  104. variable to
  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
  107. to
  108. \fB0\fR\&.
  109. .RE
  110. .SH "SECURITY"
  111. .sp
  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\&.
  113. .sp
  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:
  115. .sp
  116. .if n \{\
  117. .RS 4
  118. .\}
  119. .nf
  120. git clone \-\-no\-local \-\-upload\-pack=\*(Aqsudo \-u nobody git\-upload\-pack\*(Aq \&.\&.\&.
  121. .fi
  122. .if n \{\
  123. .RE
  124. .\}
  125. .SH "SEE ALSO"
  126. .sp
  127. \fBgitnamespaces\fR(7)
  128. .SH "GIT"
  129. .sp
  130. Part of the \fBgit\fR(1) suite