我正在尝试检查远程 git 存储库的一部分。按照这里的建议,在命令的帮助下
git archive --format=zip --remote=http://path_to_repository
但我收到错误消息:
fatal: Operation not supported by protocol.
Unexpected end of command stream
Git 不支持使用 http 协议的这种操作?那是托管环境还是git本身的问题?任何方向都会有所帮助,谢谢。
我正在尝试检查远程 git 存储库的一部分。按照这里的建议,在命令的帮助下
git archive --format=zip --remote=http://path_to_repository
但我收到错误消息:
fatal: Operation not supported by protocol.
Unexpected end of command stream
Git 不支持使用 http 协议的这种操作?那是托管环境还是git本身的问题?任何方向都会有所帮助,谢谢。
git archive
可以与支持 git 协议的服务器一起工作(即 git 服务器、smart-http和 ssh 服务器)。
在您的情况下,您的 git 太旧,或者服务器是哑 http 服务器(普通 http 服务器,没有“智能”git 支持)。您需要从那里克隆存储库和存档。
你不能用 git 来实现 http !只有 git 协议。IE
git archive --format=zip --remote=git://path_to_repository