syft icon indicating copy to clipboard operation
syft copied to clipboard

Improve install.sh error messages if we get an error from GitHub

Open morsisko opened this issue 1 year ago • 3 comments

What happened: An error during installation occurred:

[error] unable to find tag='' 
[error] do not specify a version or select a valid version from https://github.com/anchore/syft/releases

What you expected to happen: The syft to be installed

Steps to reproduce the issue: Type curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin in your terminal

Anything else we need to know?: I have seen similar issues posted there, but the bugfix was not implemented as github reverted their changes to the api endpoint, it looks like this time they implemented it again.

Environment:

PRETTY_NAME="Ubuntu 23.04"
NAME="Ubuntu"
VERSION_ID="23.04"
VERSION="23.04 (Lunar Lobster)"
VERSION_CODENAME=lunar
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=lunar
LOGO=ubuntu-logo

morsisko avatar Dec 30 '23 23:12 morsisko

Hi @morsisko, I tried this locally and couldn't reproduce the problem. I wonder if it was a transient GitHub outage? Do you mind trying again? It might be the case we need some better error handling here. Thanks!

tgerla avatar Dec 31 '23 12:12 tgerla

This is probably due to a transient outage at github. We should probably improve the error message in the install script to mention that possible cause: https://github.com/anchore/syft/blob/bf39456fbcf9105895cfabcc445f8c313e9aa01b/install.sh#L650C1-L650C1

We'll put this in the backlog for a fix.

tgerla avatar Jan 04 '24 21:01 tgerla

Hello, sorry for the delay. It works fine now. But I'm pretty sure this is no related to github outage, as I could access the repo and download the release manually without any problem

morsisko avatar Jan 06 '24 00:01 morsisko