GIT-REMOTE-EXT(1)

✨ GIT-REMOTE-EXT(1) ✨

okay so you found the git-remote-ext page β€” the one that's like, the bridge between Git's smart transport and whatever external command you want to run πŸ’… no cap, this is the manual for the remote helper that does it.


πŸŽ€ NAME πŸŽ€

git-remote-ext β€” bridge smart transport to external command. yes literally that's her job, she's the connector bestie 🫢


🌸 SYNOPSIS 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

So this remote helper uses the <command> you give it to go connect to a remote Git server. That's the whole vibe ✨

Anything written to stdin of your <command> gets treated like it's headed to a git:// server β€” git-upload-pack, git-receive-pack, or git-upload-archive, depending on the situation. And anything read from stdout of <command> is treated like it came back from that same service. iykyk πŸ’«

Command and arguments are separated by an unescaped space. Like, an actual space, not a vibe.

The following sequences are literally special, do not ignore them:

  • '% ' β€” a literal space in a command or argument.
  • %% β€” a literal percent sign.
  • %s β€” swapped out for the name (receive-pack, upload-pack, or upload-archive) of the service Git wants to invoke.
  • %S β€” swapped out for the long name (git-receive-pack, git-upload-pack, or git-upload-archive) of the service Git wants to invoke.
  • %G (must be the first characters in an argument) β€” this argument is not passed to <command>. Instead it makes the helper start off by sending git:// service requests to the remote side, with the service field set to an appropriate value and the repository field set to the rest of the argument. Default is to not send such a request. This one's iconic if your remote side is a git:// server you're reaching through some kind of tunnel πŸ”₯
  • %V (must be first characters in argument) β€” this argument is not passed to <command>. Instead it sets the vhost field in the git:// service request (to the rest of the argument). Default is to not send vhost in such a request (if one is sent).

πŸ’œ ENVIRONMENT VARIABLES πŸ’œ

  • GIT_TRANSLOOP_DEBUG β€” if it's set, prints debugging info about the various reads/writes. your nosy bestie mode πŸ”

🌈 ENVIRONMENT VARIABLES PASSED TO COMMAND 🌈

these get handed straight to your command, ok:

  • GIT_EXT_SERVICE β€” set to the long name (git-upload-pack, etc…) of the service helper needs to invoke.
  • GIT_EXT_SERVICE_NOPREFIX β€” set to the long name (upload-pack, etc…) of the service helper needs to invoke.

πŸ‘‘ EXAMPLES πŸ‘‘

Git uses this remote helper transparently when you run stuff like "git fetch <URL>", "git clone <URL>", "git push <URL>", or "git remote add <nick> <URL>", where <URL> starts with ext::. examples, bestie:

  • "ext::ssh -i /home/foo/.ssh/somekey user@host.example %S foo/repo" β€” like host.example:foo/repo, but uses /home/foo/.ssh/somekey as the keypair and user as the user on the remote side. This avoids needing to edit .ssh/config. slay, no config file drama πŸŽ€
  • "ext::socat -t3600 - ABSTRACT-CONNECT:/git-server %G/somerepo" β€” represents a repository with path /somerepo reachable over git protocol at the abstract namespace address /git-server.
  • "ext::git-server-alias foo %G/repo" β€” represents a repository with path /repo accessed via the helper program "git-server-alias foo". The path to the repo and the type of request are not passed on the command line β€” they go as part of the protocol stream, as usual with git:// protocol.
  • "ext::git-server-alias foo %G/repo %Vfoo" β€” same deal, repository with path /repo via the helper program "git-server-alias foo". But now the hostname for the remote server passed in the protocol stream will be "foo" (this lets multiple virtual Git servers share a link-level address) πŸ¦‹
  • "ext::git-server-alias foo %G/repo% with% spaces %Vfoo" β€” repository with path /repo with spaces, accessed using the helper program "git-server-alias foo". The hostname for the remote server passed in the protocol stream will be "foo" (again: multiple virtual Git servers, one link-level address). note the % doing its literal-space thing, she ate πŸ’…
  • "ext::git-ssl foo.example /bar" β€” represents a repository accessed using the helper program "git-ssl foo.example /bar". The type of request can be figured out by the helper using environment variables (see above ⬆️).

⭐ SEE ALSO ⭐


🧚 GIT 🧚

part of the git(1) suite, obviously πŸ’–


ok that's the whole page, go bridge something 🫢

and that's the tea β€” this page ships with Git 2.56.0, dated 2026-09-27. mwah πŸ’‹

πŸ“¦ where this page comes from