Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install.sh doesn't work when adding -k to curl command due to self-signed cert #1739

Closed
thommelutten opened this issue Apr 14, 2023 · 7 comments
Labels
bug Something isn't working changelog-ignore Don't include this issue in the release changelog

Comments

@thommelutten
Copy link

What happend
Running curl -k -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin when having a self-signed certificate results in the following error

[error] received HTTP status=000 for url='https://github.com/anchore/syft/releases/latest'
[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:
Syft would be downloaded and installed.

Anything else we need to know?:
The error is due to the self-signed certificate, and while I don't want to advocate for a --insecure flag, the error could be more transparent.

@thommelutten thommelutten added the bug Something isn't working label Apr 14, 2023
@Natediesel7
Copy link

Same error here. How to address?

@spiffcs
Copy link
Contributor

spiffcs commented Apr 19, 2023

👋 Thanks for filing the issue @thommelutten! -

@Natediesel7 - if you're downloading via a proxy or some other configuration you might need to modify this line in the install.sh:
https://github.com/anchore/syft/blob/main/install.sh#L207

Adding -k there should fix things up for you

There's also the option of downloading the asset directly from the release page:
https://github.com/anchore/syft/releases

We'll take a look at trying to make the error more transparent or give a workaround for those who need to bypass SSL verification.

@tgerla tgerla added this to OSS Apr 20, 2023
@tgerla tgerla moved this to Awaiting Response in OSS Apr 20, 2023
@wagoodman wagoodman removed the status in OSS Feb 7, 2024
@djbazuka01
Copy link

djbazuka01 commented Mar 28, 2024

Was this problem ever resolved as I am facing the same issue and don't know how to resolve ?. I cloned the repository and made changes to Install.sh @spiffcs but it still gives me the same error so I am not sure how to proceed with this ?.

@tgerla
Copy link
Contributor

tgerla commented Apr 18, 2024

Hi @djbazuka01, sorry for the delay replying, are you still having issues here? Can you share a full capture of the command line you're running, and the output? Thanks.

@JohnCalin
Copy link

👋 Thanks for filing the issue @thommelutten! -

@Natediesel7 - if you're downloading via a proxy or some other configuration you might need to modify this line in the install.sh: https://github.com/anchore/syft/blob/main/install.sh#L207

Adding -k there should fix things up for you

There's also the option of downloading the asset directly from the release page: https://github.com/anchore/syft/releases

We'll take a look at trying to make the error more transparent or give a workaround for those who need to bypass SSL verification.

The install script always re-downloads itself (to be sure to run the correct installer based on which version is being installed).
If you do make manual changes (for example, adding -k to your curl commands) run it with

DOWNLOAD_TAG_INSTALL_SCRIPT=false ./install.sh

to prevent re-download.

@willmurphyscode
Copy link
Contributor

Is this still an issue for anyone? If so, can you help me understand why you would want to pass -k to an install script? The install script works with GitHub specifically, and so should never trust a self-signed cert.

@thommelutten
Copy link
Author

@willmurphyscode It is no longer relevant for me, so it can be closed from my perspective.

@spiffcs spiffcs closed this as completed Dec 23, 2024
@github-project-automation github-project-automation bot moved this to Done in OSS Dec 23, 2024
@willmurphyscode willmurphyscode added the changelog-ignore Don't include this issue in the release changelog label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working changelog-ignore Don't include this issue in the release changelog
Projects
Status: Done
Development

No branches or pull requests

8 participants