Español ▾ Topics ▾ Latest version ▾ git-upload-pack last updated in 2.52.0

NOMBRE

git-upload-pack - Envía objetos empaquetados de vuelta a git-fetch-pack

SINOPSIS

git-upload-pack [--[no-]strict] [--timeout=<n>] [--stateless-rpc]
		  [--advertise-refs] <directorio>

DESCRIPCIÓN

Invoked by git fetch-pack, learns what objects the other side is missing, and sends them after packing.

This command is usually not invoked directly by the end user. The UI for the protocol is on the git fetch-pack side, and the program pair is meant to be used to pull updates from a remote repository. For push operations, see git send-pack.

OPCIONES

--strict
--no-strict

No intente <directorio>/.git/ si <directorio> no es un directorio Git.

--timeout=<n>

Interrumpir transferencia tras <n> segundos de inactividad.

--stateless-rpc

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.

--http-backend-info-refs

Used by git-http-backend[1] to serve up $GIT_URL/info/refs?service=git-upload-pack requests. See "Smart Clients" in gitprotocol-http[5] and "HTTP Transport" in the gitprotocol-v2[5] documentation. Also understood by git-receive-pack[1].

<directorio>

El repositorio del que sincronizar.

AMBIENTE

GIT_PROTOCOL

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 git[1].

GIT_NO_LAZY_FETCH

Cuando se clona o se obtiene de un repositorio parcial (por ej. Uno clonado con --filter), el extremo del servidor`upload-pack` puede necesitar obtener objetos extra de su upstream para completar la petición. Por defecto, upload-pack rechazará realizar un fetch perezoso, porque git fetch puede ejecutar comandos arbitrarios especificados en la configuración y los hooks del repositorio fuente (y upload-pack intenta ser seguro incluso si se ejecuta en directorios .git en los que no se confía).

Esto está implementado mediante el establecimiento de upload-pack internamente de la variable GIT_NO_LAZY_FETCH a 1. Si quieres sobreescribirla (porque estás haciendo un fetch de un clonado parcial, y estás seguro de confiar en él), puedes establecer de manera explícita GIT_NO_LAZY_FETCH a 0.

SEGURIDAD

La mayoría de comandos Git no se deberían ejecutar en directorios .git que no sean de confianza (mira la sección SEGURIDAD en git[1]). upload-pack intenta evitar cualquier opción de configuración peligrosa o hooks del repositorio al que se le está sirviendo, haciendo seguro clonar un directorio en el que no se confía y ejecutar comandos en el clonado resultante.

Para un nivel extra de seguridad, podrías ejecutar upload-pack como un usuario alternativo. Los pasos detallados dependen de la plataforma, pero en muchas sistemas puedes ejecutar:

git clone --no-local --upload-pack='sudo -u nobody git-upload-pack' ...

VER TAMBIÉN

GIT

Parte de la suite de git[1]