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=
"paragraph"><p><em>git remote-
<transport
></em> <repository
> [
<URL
>]
</p></div>
419 <h2 id=
"_description">DESCRIPTION
</h2>
420 <div class=
"sectionbody">
421 <div class=
"paragraph"><p>Remote helper programs are normally not used directly by end users,
422 but they are invoked by git when it needs to interact with remote
423 repositories git does not support natively. A given helper will
424 implement a subset of the capabilities documented here. When git
425 needs to interact with a repository using a remote helper, it spawns
426 the helper as an independent process, sends commands to the helper
’s
427 standard input, and expects results from the helper
’s standard
428 output. Because a remote helper runs as an independent process from
429 git, there is no need to re-link git to add a new helper, nor any
430 need to link the helper with the implementation of git.
</p></div>
431 <div class=
"paragraph"><p>Every helper must support the
"capabilities" command, which git will
432 use to determine what other commands the helper will accept. Other
433 commands generally concern facilities like discovering and updating
434 remote refs, transporting objects between the object database and
435 the remote repository, and updating the local object store.
</p></div>
436 <div class=
"paragraph"><p>Helpers supporting the
<em>fetch
</em> capability can discover refs from the
437 remote repository and transfer objects reachable from those refs to
438 the local object store. Helpers supporting the
<em>push
</em> capability can
439 transfer local objects to the remote repository and update remote refs.
</p></div>
440 <div class=
"paragraph"><p>Git comes with a
"curl" family of remote helpers, that handle various
441 transport protocols, such as
<em>git-remote-http
</em>,
<em>git-remote-https
</em>,
442 <em>git-remote-ftp
</em> and
<em>git-remote-ftps
</em>. They implement the capabilities
443 <em>fetch
</em>,
<em>option
</em>, and
<em>push
</em>.
</p></div>
445 <h2 id=
"_invocation">INVOCATION
</h2>
446 <div class=
"sectionbody">
447 <div class=
"paragraph"><p>Remote helper programs are invoked with one or (optionally) two
448 arguments. The first argument specifies a remote repository as in git;
449 it is either the name of a configured remote or a URL. The second
450 argument specifies a URL; it is usually of the form
451 <em><transport
>://
<address
></em>, but any arbitrary string is possible.
</p></div>
452 <div class=
"paragraph"><p>When git encounters a URL of the form
<em><transport
>://
<address
></em>, where
453 <em><transport
></em> is a protocol that it cannot handle natively, it
454 automatically invokes
<em>git remote-
<transport
></em> with the full URL as
455 the second argument. If such a URL is encountered directly on the
456 command line, the first argument is the same as the second, and if it
457 is encountered in a configured remote, the first argument is the name
458 of that remote.
</p></div>
459 <div class=
"paragraph"><p>A URL of the form
<em><transport
>::
<address
></em> explicitly instructs git to
460 invoke
<em>git remote-
<transport
></em> with
<em><address
></em> as the second
461 argument. If such a URL is encountered directly on the command line,
462 the first argument is
<em><address
></em>, and if it is encountered in a
463 configured remote, the first argument is the name of that remote.
</p></div>
464 <div class=
"paragraph"><p>Additionally, when a configured remote has
<em>remote.
<name
>.vcs
</em> set to
465 <em><transport
></em>, git explicitly invokes
<em>git remote-
<transport
></em> with
466 <em><name
></em> as the first argument. If set, the second argument is
467 <em>remote.
<name
>.url
</em>; otherwise, the second argument is omitted.
</p></div>
469 <h2 id=
"_commands">COMMANDS
</h2>
470 <div class=
"sectionbody">
471 <div class=
"paragraph"><p>Commands are given by the caller on the helper
’s standard input, one per line.
</p></div>
472 <div class=
"dlist"><dl>
474 <em>capabilities
</em>
478 Lists the capabilities of the helper, one per line, ending
479 with a blank line. Each capability may be preceded with
<em>*
</em>,
480 which marks them mandatory for git version using the remote
481 helper to understand (unknown mandatory capability is fatal
490 Lists the refs, one per line, in the format
"<value> <name>
491 [<attr> …]". The value may be a hex sha1 hash,
"@<dest>" for
492 a symref, or
"?" to indicate that the helper could not get the
493 value of the ref. A space-separated list of attributes follows
494 the name; unrecognized attributes are ignored. The list ends
497 <div class=
"paragraph"><p>If
<em>push
</em> is supported this may be called as
<em>list for-push
</em>
498 to obtain the current refs prior to sending one or more
<em>push
</em>
499 commands to the helper.
</p></div>
502 <em>option
</em> <name
> <value
>
506 Sets the transport helper option
<name
> to
<value
>. Outputs a
507 single line containing one of
<em>ok
</em> (option successfully set),
508 <em>unsupported
</em> (option not recognized) or
<em>error
<msg
></em>
509 (option
<name
> is supported but
<value
> is not valid
510 for it). Options should be set before other commands,
511 and may influence the behavior of those commands.
513 <div class=
"paragraph"><p>Supported if the helper has the
"option" capability.
</p></div>
516 <em>fetch
</em> <sha1
> <name
>
520 Fetches the given object, writing the necessary objects
521 to the database. Fetch commands are sent in a batch, one
522 per line, terminated with a blank line.
523 Outputs a single blank line when all fetch commands in the
524 same batch are complete. Only objects which were reported
525 in the ref list with a sha1 may be fetched this way.
527 <div class=
"paragraph"><p>Optionally may output a
<em>lock
<file
></em> line indicating a file under
528 GIT_DIR/objects/pack which is keeping a pack until refs can be
529 suitably updated.
</p></div>
530 <div class=
"paragraph"><p>Supported if the helper has the
"fetch" capability.
</p></div>
533 <em>push
</em> +
<src
>:
<dst
>
537 Pushes the given local
<src
> commit or branch to the
538 remote branch described by
<dst
>. A batch sequence of
539 one or more push commands is terminated with a blank line.
541 <div class=
"paragraph"><p>Zero or more protocol options may be entered after the last
<em>push
</em>
542 command, before the batch
’s terminating blank line.
</p></div>
543 <div class=
"paragraph"><p>When the push is complete, outputs one or more
<em>ok
<dst
></em> or
544 <em>error
<dst
> <why
>?
</em> lines to indicate success or failure of
545 each pushed ref. The status report output is terminated by
546 a blank line. The option field
<why
> may be quoted in a C
547 style string if it contains an LF.
</p></div>
548 <div class=
"paragraph"><p>Supported if the helper has the
"push" capability.
</p></div>
551 <em>import
</em> <name
>
555 Produces a fast-import stream which imports the current value
556 of the named ref. It may additionally import other refs as
557 needed to construct the history efficiently. The script writes
558 to a helper-specific private namespace. The value of the named
559 ref should be written to a location in this namespace derived
560 by applying the refspecs from the
"refspec" capability to the
563 <div class=
"paragraph"><p>Especially useful for interoperability with a foreign versioning
565 <div class=
"paragraph"><p>Supported if the helper has the
"import" capability.
</p></div>
568 <em>connect
</em> <service
>
572 Connects to given service. Standard input and standard output
573 of helper are connected to specified service (git prefix is
574 included in service name so e.g. fetching uses
<em>git-upload-pack
</em>
575 as service) on remote side. Valid replies to this command are
576 empty line (connection established),
<em>fallback
</em> (no smart
577 transport support, fall back to dumb transports) and just
578 exiting with error message printed (can
’t connect, don
’t
579 bother trying to fall back). After line feed terminating the
580 positive (empty) response, the output of service starts. After
581 the connection ends, the remote helper exits.
583 <div class=
"paragraph"><p>Supported if the helper has the
"connect" capability.
</p></div>
586 <div class=
"paragraph"><p>If a fatal error occurs, the program writes the error message to
587 stderr and exits. The caller should expect that a suitable error
588 message has been printed if the child closes the connection without
589 completing a valid response for the current command.
</p></div>
590 <div class=
"paragraph"><p>Additional commands may be supported, as may be determined from
591 capabilities reported by the helper.
</p></div>
593 <h2 id=
"_capabilities">CAPABILITIES
</h2>
594 <div class=
"sectionbody">
595 <div class=
"dlist"><dl>
613 This helper supports the corresponding command with the same name.
617 <em>refspec
</em> <em>spec
</em>
621 When using the import command, expect the source ref to have
622 been written to the destination ref. The earliest applicable
623 refspec takes precedence. For example
624 "refs/heads/*:refs/svn/origin/branches/*" means
625 that, after an
"import refs/heads/name", the script has written to
626 refs/svn/origin/branches/name. If this capability is used at
627 all, it must cover all refs reported by the list command; if
628 it is not used, it is effectively
"*:*"
633 <h2 id=
"_ref_list_attributes">REF LIST ATTRIBUTES
</h2>
634 <div class=
"sectionbody">
635 <div class=
"dlist"><dl>
641 The caller wants to use the ref list to prepare push
642 commands. A helper might chose to acquire the ref list by
643 opening a different type of connection to the destination.
651 This ref is unchanged since the last import or fetch, although
652 the helper cannot necessarily determine what value that produced.
657 <h2 id=
"_options">OPTIONS
</h2>
658 <div class=
"sectionbody">
659 <div class=
"dlist"><dl>
661 <em>option verbosity
</em> <n
>
665 Changes the verbosity of messages displayed by the helper.
666 A value of
0 for
<n
> means that processes operate
667 quietly, and the helper produces only error output.
668 1 is the default level of verbosity, and higher values
669 of
<n
> correspond to the number of -v flags passed on the
674 <em>option progress
</em> {
<em>true
</em>|
<em>false
</em>}
678 Enables (or disables) progress messages displayed by the
679 transport helper during a command.
683 <em>option depth
</em> <depth
>
687 Deepens the history of a shallow repository.
691 <em>option followtags
</em> {
<em>true
</em>|
<em>false
</em>}
695 If enabled the helper should automatically fetch annotated
696 tag objects if the object the tag points at was transferred
697 during the fetch command. If the tag is not fetched by
698 the helper a second fetch command will usually be sent to
699 ask for the tag specifically. Some helpers may be able to
700 use this option to avoid a second network connection.
704 <div class=
"paragraph"><p><em>option dry-run
</em> {
<em>true
</em>|
<em>false
</em>}:
705 If true, pretend the operation completed successfully,
706 but don
’t actually change any repository data. For most
707 helpers this only applies to the
<em>push
</em>, if supported.
</p></div>
708 <div class=
"dlist"><dl>
710 <em>option servpath
<c-style-quoted-path
></em>
714 Sets service path (--upload-pack, --receive-pack etc.) for
715 next connect. Remote helper may support this option, but
716 must not rely on this option being set before
717 connect request occurs.
722 <h2 id=
"_see_also">SEE ALSO
</h2>
723 <div class=
"sectionbody">
724 <div class=
"paragraph"><p><a href=
"git-remote.html">git-remote(
1)
</a></p></div>
726 <h2 id=
"_git">GIT
</h2>
727 <div class=
"sectionbody">
728 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
731 <div id=
"footer-text">
732 Last updated
2011-
05-
31 19:
53:
01 UTC