Does Gitlab support git archive --remote=


I’ve tried:

git archive --remote= -o HEAD:app/

And received this in response:

fatal: Operation not supported by protocol.

I also tried:

git archive --remote=ssh:// -o HEAD:app/

And received this in response:

ssh: connect to host port 22: Connection timed out fatal: The remote end hung up unexpectedly

My first question is whether Gitlab supports this operation, and if so, what changes to the command and/or configuration are required?


Hey there Greg,

Gitlab does in-fact support the use of git archive. I was able to do this successfully via SSH - example below.

git archive --remote -o HEAD

The above example uses the public repo here. The format for your SSH connection should be as follows:


You can also clone the needed URL via the project directly, by clicking on the clone button in the top right and selecting the SSH URL.

Also, would you mind trying this out without the ‘:app/’ appended to the end? I’m not really sure what this is doing. It doesn’t look like this is something that is used often, the above information took a bit of time to find.


Hey Greg,

Did this end up working out for you?


I sorry for the delayed response, and that my response won’t be helpful. I abandoned the approach I was taking and took a more conventional one. Thank you, though, for your thorough reply.