Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git archive fatal: Operation not supported by protocol

I'm trying to checkout part of remote git repository. As recommended here, with help of command

git archive --format=zip --remote=http://path_to_repository 

But I'm getting error message:

fatal: Operation not supported by protocol. Unexpected end of command stream 

Git is not supporting this operation with http protocol? Thats a problem of hosting environment or git itself? Any directions would help, thanks.

like image 865
Sly Avatar asked Jun 29 '12 08:06

Sly


2 Answers

git archive can work with a server with git protocol support (i.e. git server, smart-http and ssh server).

In your case, either your git is too old, or the server is dumb http server (normal http server, without "smart" git support). You need to clone the repository and archive from there.

like image 145
J-16 SDiZ Avatar answered Sep 23 '22 00:09

J-16 SDiZ


you can't use git achieve with http! only git protocol. i.e.

git archive --format=zip --remote=git://path_to_repository 
like image 26
user4931107 Avatar answered Sep 23 '22 00:09

user4931107