{"thread":{"id":"40950","subject":"Can't get 'git archive' to work","startedAt":"2015-12-07T05:31:06Z","lastAt":"2015-12-07T20:39:01Z","messageCount":2,"participants":["Yuri","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"274100","messageId":"5665199A.7070304@rawbw.com","threadId":"40950","inReplyTo":null,"subject":"Can't get 'git archive' to work","fromName":"Yuri","fromEmail":"yuri@rawbw.com","sentAt":"2015-12-07T05:31:06Z","receivedAt":"2015-12-07T05:31:06Z","isPatch":false,"sender":{"key":"yuri@rawbw.com","avatar":null},"body":"Getting the errors, see below.\n\nWhy \"operation is not supported\" through http and https? 'archive' is \nsupposed to be the most efficient operation to get the specific snapshot \nof the repository, and it should be available without authentication.\n\nIn case of ssh with the key there is the strange error message about \n\"core.gitProxy\". What is this about? I am not using a proxy.\n\nI couldn't get git archive to work even once.\n\n# through ssh with an active ssh key\n$ git archive --format=tar --remote=git@github.com:yurivict/vm-to-tor.git\nInvalid command: 'git-upload-archive 'yurivict/vm-to-tor.git''\n   You appear to be using ssh to clone a git:// URL.\n   Make sure your core.gitProxy config option and the\n   GIT_PROXY_COMMAND environment variable are NOT set.\nfatal: The remote end hung up unexpectedly\n\n# through ssh without an ssh key\n$  git archive --format=tar --remote=git@github.com:yurivict/vm-to-tor.git\nPermission denied (publickey).\nfatal: The remote end hung up unexpectedly\n\n# through https\n$  git archive --format=tar \n--remote=https://github.com/yurivict/vm-to-tor.git\nfatal: Operation not supported by protocol.\n\n# through http\n$  git archive --format=tar \n--remote=http://github.com/yurivict/vm-to-tor.git\nfatal: Operation not supported by protocol.\n\n\ngit-2.6.2 on FreeBSD 10.2\n\nYuri\n"},{"id":"274135","messageId":"20151207203900.GB30203@sigill.intra.peff.net","threadId":"40950","inReplyTo":"5665199A.7070304@rawbw.com","subject":"Re: Can't get 'git archive' to work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-12-07T20:39:01Z","receivedAt":"2015-12-07T20:39:01Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Dec 06, 2015 at 09:31:06PM -0800, Yuri wrote:\n\n> Why \"operation is not supported\" through http and https? 'archive' is\n> supposed to be the most efficient operation to get the specific snapshot of\n> the repository, and it should be available without authentication.\n\nRemote git-archive is not well-supported. It does work over git-daemon,\nbut the server side has to explicitly turn it on in their config. It was\nnever plumbed into the git-over-http protocol at all. ssh is generally\nthe only place it works out-of-the-box (but see below).\n\n> In case of ssh with the key there is the strange error message about\n> \"core.gitProxy\". What is this about? I am not using a proxy.\n> [...]\n> # through ssh with an active ssh key\n> $ git archive --format=tar --remote=git@github.com:yurivict/vm-to-tor.git\n> Invalid command: 'git-upload-archive 'yurivict/vm-to-tor.git''\n>   You appear to be using ssh to clone a git:// URL.\n>   Make sure your core.gitProxy config option and the\n>   GIT_PROXY_COMMAND environment variable are NOT set.\n> fatal: The remote end hung up unexpectedly\n\nThis message isn't from git, but rather from GitHub's ssh server. You\ncan see it here without running git locally at all:\n\n  $ ssh git@github.com git-upload-archive\n  Invalid command: 'git-upload-archive'\n  You appear to be using ssh to clone a git:// URL.\n  Make sure your core.gitProxy config option and the\n  GIT_PROXY_COMMAND environment variable are NOT set.\n\nThe short of it is that GitHub does not support remote git-archive at\nall, not even over ssh. Part of the reason is that it maintains a\nseparate caching layer for grabbing zips and tarballs, which is\navailable at an http endpoint:\n\n  https://github.com/yurivict/vm-to-tor/archive/master.tar.gz\n\nClearly the advice above is not helpful in this case; I don't recall the\ncase that it was originally written to help. You may want to write to\nGitHub support about it.\n\n> # through ssh without an ssh key\n> $  git archive --format=tar --remote=git@github.com:yurivict/vm-to-tor.git\n> Permission denied (publickey).\n> fatal: The remote end hung up unexpectedly\n\nGitHub's ssh server only accepts key authentication, so this is not\nsurprising.\n\n> # through https\n> $  git archive --format=tar\n> --remote=https://github.com/yurivict/vm-to-tor.git\n> fatal: Operation not supported by protocol.\n> \n> # through http\n> $  git archive --format=tar\n> --remote=http://github.com/yurivict/vm-to-tor.git\n> fatal: Operation not supported by protocol.\n\nThis comes from the local git client. There's no scheme defined for\nhitting git-upload-archive (the server side of a remote git-archive)\nover HTTP. You'd have to define it, implement the client side of it, and\nthen convince the server side to configure their HTTP servers to handle\nit as a CGI. That might be a nice project to work on, but it will not\nget you tarballs anytime soon. :)\n\n-Peff\n"}]}