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

Re: Basic git-archive --remote question

From
Carlos Martín Nieto <cmn@elego.de>
Date
Jun 25, 2013, 13:16 UTC
Message-ID
<1372166198.20511.5.camel@flaca.cmartin.tk>
In-Reply-To
<CAGpXXZJuC09t8-5d=p4KNs9rQ-S347eBNuKcKWFhXZTnkLW0sA@mail.gmail.com>
On Mon, 2013-06-24 at 15:53 -0400, Greg Freemyer wrote:
Show 17 quoted lines
> 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.
> 
> Can someone help me?
> 
> == details
> 
> git v1.8.1.4
> 
> The upstream git repo is at: https://github.com/dkovar/analyzeMFT
> 
> Here's a few attempts using git as the protocol:
> 
> > git archive --format=tar --remote=github.com:dkovar/analyzeMFT.git v2.0.4
> 
> Permission denied (publickey).
> fatal: The remote end hung up unexpectedly

Assuming you haven't set up any ssh rules for the github.com host, you're trying to log in with ssh with your local username, which isn't going to work.

Show 7 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
> 

This is the right format. GitHub doesn't allow remote archive requests, which is why it's complaining.

If you want a tarball from GitHub, you need to download over HTTP from the links they provide (which you can find e.g. through the web UI).

Show 6 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

Using git as the ssh user is the right thing (if you want to talk git over ssh) with GitHub and a few other sites/hosting programs, as your public key is used to determine which user is trying to connect without giving each user an account on the underlying OS.

   cmn
Previous: Greg FreemyerNext: Jeff King
Message 2 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.