1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.4.5" />
7 <title>git-remote-helpers(
1)
</title>
8 <style type=
"text/css">
10 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
12 border: 1px solid red;
17 margin: 1em 5% 1em 5%;
22 text-decoration: underline
;
42 h1
, h2
, h3
, h4
, h5
, h6
{
44 font-family: sans-serif
;
51 border-bottom: 2px solid silver
;
69 border: 1px solid silver
;
88 font-family: sans-serif
;
94 span#revnumber
, span#revdate
, span#revremark
{
95 font-family: sans-serif
;
99 font-family: sans-serif
;
101 border-top: 2px solid silver
;
107 padding-bottom: 0.5em;
111 padding-bottom: 0.5em;
116 margin-bottom: 1.5em;
118 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
119 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
120 div
.admonitionblock
{
122 margin-bottom: 1.5em;
124 div
.admonitionblock
{
126 margin-bottom: 2.5em;
129 div
.content
{ /* Block element content. */
133 /* Block element titles. */
134 div
.title
, caption
.title
{
136 font-family: sans-serif
;
140 margin-bottom: 0.5em;
146 td div
.title:first-child
{
149 div
.content div
.title:first-child
{
152 div
.content
+ div
.title
{
156 div
.sidebarblock
> div
.content
{
158 border: 1px solid silver
;
162 div
.listingblock
> div
.content
{
163 border: 1px solid silver
;
172 div
.quoteblock
> div
.attribution
{
181 div
.verseblock
> div
.content
{
184 div
.verseblock
> div
.attribution
{
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div
.verseblock
+ div
.attribution
{
193 div
.admonitionblock
.icon
{
197 text-decoration: underline
;
199 padding-right: 0.5em;
201 div
.admonitionblock td
.content
{
203 border-left: 2px solid silver
;
206 div
.exampleblock
> div
.content
{
207 border-left: 2px solid silver
;
211 div
.imageblock div
.content
{ padding-left: 0; }
212 span
.image img
{ border-style: none
; }
213 a
.image:visited
{ color: white
; }
217 margin-bottom: 0.8em;
230 list-style-position: outside
;
233 list-style-type: decimal
;
236 list-style-type: lower-alpha
;
239 list-style-type: upper-alpha
;
242 list-style-type: lower-roman
;
245 list-style-type: upper-roman
;
248 div
.compact ul
, div
.compact ol
,
249 div
.compact p
, div
.compact p
,
250 div
.compact div
, div
.compact div
{
252 margin-bottom: 0.1em;
255 div
.tableblock
> table
{
256 border: 3px solid
#527bbd;
259 font-family: sans-serif
;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div
.tableblock
> table
[frame
="void"] {
275 div
.tableblock
> table
[frame
="hsides"] {
276 border-left-style: none
;
277 border-right-style: none
;
279 div
.tableblock
> table
[frame
="vsides"] {
280 border-top-style: none
;
281 border-bottom-style: none
;
287 margin-bottom: 0.8em;
290 padding-bottom: 15px;
292 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
298 padding-right: 0.8em;
304 div
.hdlist
.compact tr
{
314 div#footer-badges
{ display: none
; }
319 font-family: sans-serif
;
323 margin-bottom: 0.1em;
326 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
342 /* Overrides for manpage documents */
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver
;
347 border-bottom: 2px solid silver
;
357 div#toc
{ display: none
; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div
.sidebar-content
{
364 border: 1px solid silver
;
367 div
.sidebar-title
, div
.image-title
{
369 font-family: sans-serif
;
372 margin-bottom: 0.5em;
375 div
.listingblock div
.content
{
376 border: 1px solid silver
;
381 div
.quoteblock-attribution
{
386 div
.verseblock-content
{
389 div
.verseblock-attribution
{
394 div
.exampleblock-content
{
395 border-left: 2px solid silver
;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc
a:visited
{ color: blue
; }
406 git-remote-helpers(
1) Manual Page
409 <div class=
"sectionbody">
410 <p>git-remote-helpers -
411 Helper programs to interact with remote repositories
415 <h2 id=
"_synopsis">SYNOPSIS
</h2>
416 <div class=
"sectionbody">
417 <div class=
"verseblock">
418 <div class=
"verseblock-content"><em>git remote-
<transport
></em> <repository
> [
<URL
>]
</div>
419 <div class=
"verseblock-attribution">
422 <h2 id=
"_description">DESCRIPTION
</h2>
423 <div class=
"sectionbody">
424 <div class=
"paragraph"><p>Remote helper programs are normally not used directly by end users,
425 but they are invoked by git when it needs to interact with remote
426 repositories git does not support natively. A given helper will
427 implement a subset of the capabilities documented here. When git
428 needs to interact with a repository using a remote helper, it spawns
429 the helper as an independent process, sends commands to the helper
’s
430 standard input, and expects results from the helper
’s standard
431 output. Because a remote helper runs as an independent process from
432 git, there is no need to re-link git to add a new helper, nor any
433 need to link the helper with the implementation of git.
</p></div>
434 <div class=
"paragraph"><p>Every helper must support the
"capabilities" command, which git will
435 use to determine what other commands the helper will accept. Other
436 commands generally concern facilities like discovering and updating
437 remote refs, transporting objects between the object database and
438 the remote repository, and updating the local object store.
</p></div>
439 <div class=
"paragraph"><p>Helpers supporting the
<em>fetch
</em> capability can discover refs from the
440 remote repository and transfer objects reachable from those refs to
441 the local object store. Helpers supporting the
<em>push
</em> capability can
442 transfer local objects to the remote repository and update remote refs.
</p></div>
443 <div class=
"paragraph"><p>Git comes with a
"curl" family of remote helpers, that handle various
444 transport protocols, such as
<em>git-remote-http
</em>,
<em>git-remote-https
</em>,
445 <em>git-remote-ftp
</em> and
<em>git-remote-ftps
</em>. They implement the capabilities
446 <em>fetch
</em>,
<em>option
</em>, and
<em>push
</em>.
</p></div>
448 <h2 id=
"_invocation">INVOCATION
</h2>
449 <div class=
"sectionbody">
450 <div class=
"paragraph"><p>Remote helper programs are invoked with one or (optionally) two
451 arguments. The first argument specifies a remote repository as in git;
452 it is either the name of a configured remote or a URL. The second
453 argument specifies a URL; it is usually of the form
454 <em><transport
>://
<address
></em>, but any arbitrary string is possible.
</p></div>
455 <div class=
"paragraph"><p>When git encounters a URL of the form
<em><transport
>://
<address
></em>, where
456 <em><transport
></em> is a protocol that it cannot handle natively, it
457 automatically invokes
<em>git remote-
<transport
></em> with the full URL as
458 the second argument. If such a URL is encountered directly on the
459 command line, the first argument is the same as the second, and if it
460 is encountered in a configured remote, the first argument is the name
461 of that remote.
</p></div>
462 <div class=
"paragraph"><p>A URL of the form
<em><transport
>::
<address
></em> explicitly instructs git to
463 invoke
<em>git remote-
<transport
></em> with
<em><address
></em> as the second
464 argument. If such a URL is encountered directly on the command line,
465 the first argument is
<em><address
></em>, and if it is encountered in a
466 configured remote, the first argument is the name of that remote.
</p></div>
467 <div class=
"paragraph"><p>Additionally, when a configured remote has
<em>remote.
<name
>.vcs
</em> set to
468 <em><transport
></em>, git explicitly invokes
<em>git remote-
<transport
></em> with
469 <em><name
></em> as the first argument. If set, the second argument is
470 <em>remote.
<name
>.url
</em>; otherwise, the second argument is omitted.
</p></div>
472 <h2 id=
"_commands">COMMANDS
</h2>
473 <div class=
"sectionbody">
474 <div class=
"paragraph"><p>Commands are given by the caller on the helper
’s standard input, one per line.
</p></div>
475 <div class=
"dlist"><dl>
477 <em>capabilities
</em>
481 Lists the capabilities of the helper, one per line, ending
482 with a blank line. Each capability may be preceded with
<em>*
</em>,
483 which marks them mandatory for git version using the remote
484 helper to understand (unknown mandatory capability is fatal
493 Lists the refs, one per line, in the format
"<value> <name>
494 [<attr> …]". The value may be a hex sha1 hash,
"@<dest>" for
495 a symref, or
"?" to indicate that the helper could not get the
496 value of the ref. A space-separated list of attributes follows
497 the name; unrecognized attributes are ignored. The list ends
500 <div class=
"paragraph"><p>If
<em>push
</em> is supported this may be called as
<em>list for-push
</em>
501 to obtain the current refs prior to sending one or more
<em>push
</em>
502 commands to the helper.
</p></div>
505 <em>option
</em> <name
> <value
>
509 Sets the transport helper option
<name
> to
<value
>. Outputs a
510 single line containing one of
<em>ok
</em> (option successfully set),
511 <em>unsupported
</em> (option not recognized) or
<em>error
<msg
></em>
512 (option
<name
> is supported but
<value
> is not valid
513 for it). Options should be set before other commands,
514 and may influence the behavior of those commands.
516 <div class=
"paragraph"><p>Supported if the helper has the
"option" capability.
</p></div>
519 <em>fetch
</em> <sha1
> <name
>
523 Fetches the given object, writing the necessary objects
524 to the database. Fetch commands are sent in a batch, one
525 per line, terminated with a blank line.
526 Outputs a single blank line when all fetch commands in the
527 same batch are complete. Only objects which were reported
528 in the ref list with a sha1 may be fetched this way.
530 <div class=
"paragraph"><p>Optionally may output a
<em>lock
<file
></em> line indicating a file under
531 GIT_DIR/objects/pack which is keeping a pack until refs can be
532 suitably updated.
</p></div>
533 <div class=
"paragraph"><p>Supported if the helper has the
"fetch" capability.
</p></div>
536 <em>push
</em> +
<src
>:
<dst
>
540 Pushes the given local
<src
> commit or branch to the
541 remote branch described by
<dst
>. A batch sequence of
542 one or more push commands is terminated with a blank line.
544 <div class=
"paragraph"><p>Zero or more protocol options may be entered after the last
<em>push
</em>
545 command, before the batch
’s terminating blank line.
</p></div>
546 <div class=
"paragraph"><p>When the push is complete, outputs one or more
<em>ok
<dst
></em> or
547 <em>error
<dst
> <why
>?
</em> lines to indicate success or failure of
548 each pushed ref. The status report output is terminated by
549 a blank line. The option field
<why
> may be quoted in a C
550 style string if it contains an LF.
</p></div>
551 <div class=
"paragraph"><p>Supported if the helper has the
"push" capability.
</p></div>
554 <em>import
</em> <name
>
558 Produces a fast-import stream which imports the current value
559 of the named ref. It may additionally import other refs as
560 needed to construct the history efficiently. The script writes
561 to a helper-specific private namespace. The value of the named
562 ref should be written to a location in this namespace derived
563 by applying the refspecs from the
"refspec" capability to the
566 <div class=
"paragraph"><p>Especially useful for interoperability with a foreign versioning
568 <div class=
"paragraph"><p>Supported if the helper has the
"import" capability.
</p></div>
571 <em>connect
</em> <service
>
575 Connects to given service. Standard input and standard output
576 of helper are connected to specified service (git prefix is
577 included in service name so e.g. fetching uses
<em>git-upload-pack
</em>
578 as service) on remote side. Valid replies to this command are
579 empty line (connection established),
<em>fallback
</em> (no smart
580 transport support, fall back to dumb transports) and just
581 exiting with error message printed (can
’t connect, don
’t
582 bother trying to fall back). After line feed terminating the
583 positive (empty) response, the output of service starts. After
584 the connection ends, the remote helper exits.
586 <div class=
"paragraph"><p>Supported if the helper has the
"connect" capability.
</p></div>
589 <div class=
"paragraph"><p>If a fatal error occurs, the program writes the error message to
590 stderr and exits. The caller should expect that a suitable error
591 message has been printed if the child closes the connection without
592 completing a valid response for the current command.
</p></div>
593 <div class=
"paragraph"><p>Additional commands may be supported, as may be determined from
594 capabilities reported by the helper.
</p></div>
596 <h2 id=
"_capabilities">CAPABILITIES
</h2>
597 <div class=
"sectionbody">
598 <div class=
"dlist"><dl>
616 This helper supports the corresponding command with the same name.
620 <em>refspec
</em> <em>spec
</em>
624 When using the import command, expect the source ref to have
625 been written to the destination ref. The earliest applicable
626 refspec takes precedence. For example
627 "refs/heads/*:refs/svn/origin/branches/*" means
628 that, after an
"import refs/heads/name", the script has written to
629 refs/svn/origin/branches/name. If this capability is used at
630 all, it must cover all refs reported by the list command; if
631 it is not used, it is effectively
"*:*"
636 <h2 id=
"_ref_list_attributes">REF LIST ATTRIBUTES
</h2>
637 <div class=
"sectionbody">
638 <div class=
"dlist"><dl>
644 The caller wants to use the ref list to prepare push
645 commands. A helper might chose to acquire the ref list by
646 opening a different type of connection to the destination.
654 This ref is unchanged since the last import or fetch, although
655 the helper cannot necessarily determine what value that produced.
660 <h2 id=
"_options">OPTIONS
</h2>
661 <div class=
"sectionbody">
662 <div class=
"dlist"><dl>
664 <em>option verbosity
</em> <n
>
668 Changes the verbosity of messages displayed by the helper.
669 A value of
0 for
<n
> means that processes operate
670 quietly, and the helper produces only error output.
671 1 is the default level of verbosity, and higher values
672 of
<n
> correspond to the number of -v flags passed on the
677 <em>option progress
</em> {
<em>true
</em>|
<em>false
</em>}
681 Enables (or disables) progress messages displayed by the
682 transport helper during a command.
686 <em>option depth
</em> <depth
>
690 Deepens the history of a shallow repository.
694 <em>option followtags
</em> {
<em>true
</em>|
<em>false
</em>}
698 If enabled the helper should automatically fetch annotated
699 tag objects if the object the tag points at was transferred
700 during the fetch command. If the tag is not fetched by
701 the helper a second fetch command will usually be sent to
702 ask for the tag specifically. Some helpers may be able to
703 use this option to avoid a second network connection.
707 <div class=
"paragraph"><p><em>option dry-run
</em> {
<em>true
</em>|
<em>false
</em>}:
708 If true, pretend the operation completed successfully,
709 but don
’t actually change any repository data. For most
710 helpers this only applies to the
<em>push
</em>, if supported.
</p></div>
711 <div class=
"dlist"><dl>
713 <em>option servpath
<c-style-quoted-path
></em>
717 Sets service path (--upload-pack, --receive-pack etc.) for
718 next connect. Remote helper may support this option, but
719 must not rely on this option being set before
720 connect request occurs.
725 <h2 id=
"_see_also">SEE ALSO
</h2>
726 <div class=
"sectionbody">
727 <div class=
"paragraph"><p><a href=
"git-remote.html">git-remote(
1)
</a></p></div>
729 <h2 id=
"_git">GIT
</h2>
730 <div class=
"sectionbody">
731 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
734 <div id=
"footer-text">
735 Last updated
2011-
07-
23 00:
49:
30 UTC