I'm trying to install ruby using RVM in Cygwin, but I'm getting the error:
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
i've looked at this question: Curl Certificate Error when Using RVM to install Ruby 1.9.2
but unfortunately the solution doesn't work for me because curl-config --ca doesn't show anything. I checked with curl-config --configure and it seems the package was compiled with the --without-ca-bundle
how can I work around this?
this is the same question. open ~/.rvm/scripts/fetch and edit every "fetch_command=..." line to have a -k option.
It seems curl in cygwin isn't shipped with its CA certificates bundle. You can download it at http://curl.haxx.se/ca/cacert.pem then use:
CURL_CA_BUNDLE=</path/to/cacert.pem> rvm install <ruby>
If you don't have ~/.rvm directory then do which rvm and then edit [rvm-path]/../scripts/fetch. Each curl command need -k. Ie:
...
fetch_command="curl -k -x${rvm_proxy} -f -L --create-dirs -C - " # -s for silent
else
fetch_command="curl -k -f -L --create-dirs -C - " # -s for silent
...
This worked for Cygwin.
Related
Description
Hi we are using rvm on macos-big sur AWS ec2 machines but it seems that there is an issue with rvm and openssl
Steps to reproduce
We installed rvm and ruby via packer
brew install gpg2
echo " ------------------ GPG2 Installation completed -----------------------"
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
curl -sSL https://get.rvm.io | bash -s stable
source ~/.bash_profile && rvm install "ruby-3.0.0"
It looks okay
rvm use 3.0.0
openssl version
which openssl
Using /Users/ec2-user/.rvm/gems/ruby-3.0.0
/usr/bin/openssl
LibreSSL 2.8.3
But when I
git clone https://github.com/mislav/ssl-tools.git
ruby ssl-tools/doctor.rb
I get an error
Using /Users/ec2-user/.rvm/gems/ruby-3.0.0
/Users/ec2-user/.rvm/rubies/ruby-3.0.0/bin/ruby (3.0.0-p0)
OpenSSL 1.1.1m 14 Dec 2021: /usr/local/etc/openssl#1.1
SSL_CERT_DIR=""
SSL_CERT_FILE=""
HEAD https://status.github.com:443
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
The server presented a certificate that could not be verified:
subject: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
error code 20: unable to get local issuer certificate
Possible causes:
/usr/local/etc/openssl#1.1/cert.pem' does not exist /usr/local/etc/openssl#1.1/certs/' is empty
When I
brew doctor
I get
Using /Users/ec2-user/.rvm/gems/ruby-3.0.0
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting your PATH for example like so:
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
Warning: Broken symlinks were found. Remove them with brew cleanup:
/usr/local/etc/gnutls/cert.pem
/usr/local/etc/openssl#1.1/cert.pem
Asked the same question in github.com/rvm
This was the solution that worked
In ~/.bashrc
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
In ~/.bash_profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
In ~/.zshrc
# Avoid warning: Homebrew's "sbin" was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin
export PATH="/usr/local/sbin:$PATH"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
In provisioner
# Remove broken symlinks before using brew
/usr/local/bin/brew cleanup
/usr/local/bin/brew install gpg2
echo "------------------ GPG2 Installation completed -----------------"
curl -sSL https://rvm.io/mpapis.asc | /usr/local/bin/gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | /usr/local/bin/gpg --import -
curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles
source ~/.bash_profile
How could I install brew on macos 10.15.6:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
yields:
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Is this a question for StackOverflow or AskDifferent?
git clone brewrepowhereveritis
mv brew Library /usr/local
I'm trying to install cairo on mac 10.13.6 using brew 1.2.2. I'm getting this error:
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
I'm behind a corporate proxy and have set the http_proxy and https_proxy variables. When I use the brew verbose option it looks like it is using Apple's default curl libraries (not sure why, but various comments hint that this version is problematic):
brew install -v cairo
...
Downloading https://...libpng...
/usr/bin/curl --remote-time --location --user-agent ...
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Check version:
/usr/bin/curl --version
curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
I downloaded and built the newest curl library from here. Using this curl install I can download libpng manually.
./configure --prefix=~/curl --with-darwinssl
curl ...libpng... > libpng-1.6.34.tar.xz
I tried to get brew to use this curl install by prefixing my path:
export PATH=~/curl:$PATH
But it looks like brew is still using Apple's curl lib (output did not change from the above).
My question is: how do I make brew use this new curl install? Or am I just on the wrong track to make this work?
My travis build suddenly started to fail with (between before_deploy and deploy):
Ruby ruby-2.2.5 is not installed.
The command "rvm 2.2.5 --fuzzy do ruby -S gem install dpl" failed and exited with 2 during .
Ideas how to fix this?
.travis.yaml
before_deploy:
- export PATH=$PATH:${CLOUD_SDK_PATH}/bin
- openssl aes-256-cbc -K $encrypted_c09a72752447_key -iv $encrypted_c09a72752447_iv -in contrib/gae/secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
deploy:
- provider: script
skip_cleanup: true
script: fab deploy:target='DEV',ci=True
on: develop
I just hit this too. As a workaround, you might be able to install ruby 2.2.5 explicitly, adding an install command to my before_install step works for me:
before_install:
- rvm install 2.2.5
Sorry, everyone. We had a bad deploy earlier today. This should be fixed now.
I am trying to get SFTP support for curl in OSX. I installed curl via
$ brew install curl --with-ssh
and I also symlinked the homebrew version to the /usr/bin via
$ sudo ln -s /usr/local/bin/curl /usr/bin/curl
But I am still getting a
curl: (1) Protocol sftp not supported or disabled in libcurl
when using
$ curl sftp://some.host.com/path/to/file
My endeavor is connected to an issue for the awesome git-ftp https://github.com/resmo/git-ftp/issues/146
What am I doing wrong?
run 'curl -V' and see if SFTP is listed as a supported protocol.
If it isn't, curl needs to be rebuilt with libssh2 to get the support built-in.
Since the --with-libssh2 option was removed from brew, this is the way to go:
brew install curl-openssl
Be aware:
curl is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have curl first in your PATH, run:
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc
or call it directly by using:
/usr/local/opt/curl/bin/curl ...
If you are on a mac you will have to run this to enable first:
brew install curl --with-libssh2