git archive fatal: Operation not supported by protocol

风格不统一 提交于 2019-11-30 00:16:39

问题


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.


回答1:


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.




回答2:


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

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


来源:https://stackoverflow.com/questions/11258599/git-archive-fatal-operation-not-supported-by-protocol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!