Cannot download "other" self hosted release assets
Checklist
-
I'm using the latest version of the extension (Run glab --version
)- Extension version: glab version 1.27.0
-
Operating system and version: Debian GNU/Linux 11 (bullseye) -
Gitlab.com or self-managed instance? self-managed instance -
GitLab version (if self-managed) 15.7.0-ee (Use the version
endpoint, like this: gitlab.my-company.com/api/v4/version) -
I have performed glab auth status
to check for authentication issues
Summary
When I try to download my release assets on a self hosted gitlab instance, I receive a 404 error when the cli tool attempts to download the assets under the other
category.
Strangely, when I click the link in the error log as reported to have the 404 error, the browser is able to download the asset OK.
Steps to reproduce
#Create an release with extra files
glab release create nightly path/to/file.tar.gz
#Now download it
glab release download nightly -x
What is the current bug behavior?
I get a 404 error when the Other
(enabled with the -x
flag) is attempted to be downloaded
What is the expected correct behavior?
I expect that the download should work OK. Also it is strange that the download via the browser works. I click the error link verbatim from the console and the browser will download the asset fine.
LOGS
• fetching release repo=software-engineering/device/zephyr-netway tag=nightly
• downloading release assets repo=software-engineering/device/zephyr-netway tag=nightly
• downloading file name=file url=https://gitlab.my-company.com/blah/blah/blah/uploads/aaa14893b9bfc5afff3ec96dda2a2117/file.tar.gz
x failed to download release error=404 Not Found
Possible fixes
I noticed with glab version 1.26.0 would fail with a 302 error and was redirecting to gitlab.com
. When I upgraded 1.27.0 glab fails with a 404 error. And strangly, the advertised link in the error log is working! So a possible fix would be to use the actual link in the error log when you make the actual request!
I'm guessing that the url in the log and the requested url that makes it out to the network is different.