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

Failed to download versions.txt #361

Closed
sethvargo opened this issue Dec 19, 2019 · 13 comments
Closed

Failed to download versions.txt #361

sethvargo opened this issue Dec 19, 2019 · 13 comments

Comments

@sethvargo
Copy link

sethvargo commented Dec 19, 2019

(Very similar to #261)

$ ruby-install ruby 2.6
>>> Updating ruby versions ...
!!! Failed to download https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt to /Users/sethvargo/.cache/ruby-install/ruby/versions.txt!
!!! Failed to download ruby versions!

Both curl and wget are installed from homebrew:

$ curl --version
curl 7.67.0 (x86_64-apple-darwin19.0.0) libcurl/7.67.0 SecureTransport zlib/1.2.11
Release-Date: 2019-11-06

$ wget --version
GNU Wget 1.20.3 built on darwin19.0.0.
  • Visiting in the browser works fine

  • Doing a regular curl works fine:

    $ curl https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt
    # outputs list
    
  • Running the curl command in Downloading latest versions fails #261 works:

    $ curl -f -L -C - -o ~/.cache/ruby-install/ruby/versions.txt.part "https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt"
    
  • Doing a regular wget fails:

    $ wget https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
    ERROR: cannot verify raw.githubusercontent.com's certificate, issued by ‘CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US’:
      Unable to locally verify the issuer's authority.
    To connect to raw.githubusercontent.com insecurely, use `--no-check-certificate'.
    
  • Running the wget command in Downloading latest versions fails #261 fails:

    $ wget -c -O ~/.cache/ruby-install/ruby/versions.txt.part "https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt"
    --2019-12-19 09:39:13--  https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
    ERROR: cannot verify raw.githubusercontent.com's certificate, issued by ‘CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US’:
      Unable to locally verify the issuer's authority.
    To connect to raw.githubusercontent.com insecurely, use `--no-check-certificate'.
    

Unlike #261, I'm on a Mac, Catalina 10.15.2 (19C57).

I also tried re-installing ruby-install from head and the same issue occurs.

@sethvargo
Copy link
Author

Is there a way to force ruby-install to use curl instead of wget?

@sethvargo
Copy link
Author

I removed wget from my path and it worked successfully. It would be nice to be able to force curl with a CLI flag or something. Also a --verbose or similar flag might have helped debug this more.

@rowend
Copy link

rowend commented Jan 2, 2020

Maybe it is not the right response ... but I had similar issue then I updated the package wget and all worked...

@FranklinYu
Copy link

Hi both, macOS Catalina doesn’t come with wget. How did you installed your wget?

@rowend
Copy link

rowend commented Jan 8, 2020

Hi @FranklinYu I installed it with brew:
brew install wget

More info about brew please visit https://brew.sh/

@arjunmdas
Copy link

In my case, upgrading wget did the trick

brew upgrade wget 

@pjaspers
Copy link

Can confirm that brew upgrade wget solved it for me as well.

@0xdevalias
Copy link

Mine looked similar to the initial errors shown above at first, but quite different when I looked at wget itself. Upgrading with brew upgrade wget fixed my broken install, and seems to work properly now.

In case it helps anyone else, wget output looked like this:

⇒  wget --version
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/wget
  Reason: image not found
zsh: abort      wget --version

@sethvargo
Copy link
Author

Can't reproduce this anyone.

@FranklinYu
Copy link

FranklinYu commented Oct 30, 2020

From reading all the reports above, the root cause seems like Homebrew messing up their wget from time to time. (My wget installed by MacPorts never hit this issue.) I guess it’s more useful to report the issue to them, given that the issue can be reproduced by a stand-alone wget command.

@Daydh7
Copy link

Daydh7 commented Jan 6, 2023

In my case, upgrading wget did the trick

brew upgrade wget 

This worked for me too

@datapresso
Copy link

I removed wget from my path and it worked successfully. It would be nice to be able to force curl with a CLI flag or something. Also a --verbose or similar flag might have helped debug this more.

I had to use this tip to resolve my issue. I am on MacOS Monterey 12.6. installing wget or upgrade wget didn't help.

@jason-ltc

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants