git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Basic git-archive --remote question

From
Jeff King <peff@peff.net>
Date
Jun 26, 2013, 07:01 UTC
Message-ID
<20130626070105.GA5905@sigill.intra.peff.net>
In-Reply-To
<CAGpXXZJuC09t8-5d=p4KNs9rQ-S347eBNuKcKWFhXZTnkLW0sA@mail.gmail.com>
On Mon, Jun 24, 2013 at 03:53:56PM -0400, Greg Freemyer wrote:
> I'm trying to create a tarball from a git tag and I can't get the
> syntax right.  The documentation is not very clear.
> [...]
> > git archive --format=tar --remote=github.com:dkovar/analyzeMFT.git v2.0.4
Your remote should be git@github.com:dkovar/analyzeMFT.git.
But...
Show 5 quoted lines
> > git archive --format=tar --remote=git://github.com/dkovar/analyzeMFT v2.0.4
> 
> fatal: remote error
>    Your Git client has made an invalid request:
>    003agit-upload-archive /dkovar/analyzeMFT

Your syntax is fine, but GitHub does not support remote git-archive requests. Not over git://, and not over ssh. In both cases the error messages are rather confusing and unhelpful, though.

> > git archive --format=tar --remote=//github.com/dkovar/analyzeMFT v2.0.4

This is wrong, as it is looking for //github.com... in the local filesystem.

Show 5 quoted lines
> The github page also says I can use ssh with git as the user, but that
> complains I don't have the private key (which I don't):
> 
> git archive --format=tar
> --remote=ssh://git@github/com/dkovar/analyzeMFT.git v2.0.4

If you have a GitHub account and register your public key, then you can use ssh to fetch from the repository (using the git@github.com:user/repo syntax). However, remote git-archive is not currently supported, so it would not help you.

-Peff
Previous: Carlos Martín Nieto
Message 3 of 3 in “Basic git-archive --remote question”
  1. Greg FreemyerJun 24, 2013
  2. Carlos Martín NietoJun 25, 2013
  3. Jeff KingJun 26, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.