Does Gitlab support git archive --remote=


#1

I’ve tried:

git archive --remote=https://xyz.com/mosaic/widget.git -o test.zip HEAD:app/

And received this in response:

fatal: Operation not supported by protocol.

I also tried:

git archive --remote=ssh://xyz.com/mosaic/widget.git -o test.zip HEAD:app/

And received this in response:

ssh: connect to host xyz.com 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?


#2

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 git@gitlab.com:gitlab-org/distribution/team-tasks.git -o test.zip HEAD

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

git@<hostname>:path/to/project.git

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.


#3

Hey Greg,

Did this end up working out for you?


#4

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.