Official links
| Service / App | URL |
|---|---|
| Platform.sh PaaS | https://platform.sh/ |
| Platform.sh CLI Git Repository | https://github.com/platformsh/cli |
Overview
I received the following error when using the Platform.sh CLI immediately after installing it on Rocky Linux 9.5 (Blue Onyx):
[RequestException]
cURL error 77: error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: noneThankfully, it’s a simple fix.
Steps
- I used
curlto install the Platform.sh CLI:
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash- After installing, I ran the
platformcommand (aliased below asp) to list my projects:
dclaverie@nomad $ p
Welcome to Platform.sh!
Loading projects...
Authentication is required.
Log in via a browser? [Y/n] Y
Opened URL: http://127.0.0.1:5000
Please use the browser to log in.
Help:
Leave this command running during login.
If you need to quit, use Ctrl+C.
Opening in existing browser session.
Login information received. Verifying...
[RequestException]
cURL error 77: error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
dclaverie@nomad $- What’s it’s looking for doesn’t exist:
dclaverie@nomad $ ll /etc/ssl/certs/ca-certificates.crt
ls: cannot access '/etc/ssl/certs/ca-certificates.crt': No such file or directory
dclaverie@nomad $- These files are here:
dclaverie@nomad $ ll /etc/ssl/certs/
total 0
lrwxrwxrwx. 1 root root 49 Aug 22 02:56 ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
lrwxrwxrwx. 1 root root 55 Aug 22 02:56 ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
dclaverie@nomad $- Create a link:
dclaverie@nomad $ sudo ln -s /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/ssl/certs/ca-certificates.crt
dclaverie@nomad $- Issue the
platformcommand again:
dclaverie@nomad $ p
Welcome to Platform.sh!
Loading projects...
Authentication is required.
Log in via a browser? [Y/n] Y
Opened URL: http://127.0.0.1:5000
Please use the browser to log in.
Help:
Leave this command running during login.
If you need to quit, use Ctrl+C.
Opening in existing browser session.
Login information received. Verifying...
You are logged in.
Generating SSH certificate...
A new SSH certificate has been generated.
It will be automatically refreshed when necessary.
Checking SSH configuration file: /home/dclaverie/.ssh/config
Do you want to update the file automatically? [Y/n] Y
Configuration file updated successfully: /home/dclaverie/.ssh/config
Username: dclaverie
Email address: ...
Your projects are:
...
Get a project by running: platform get [id]
List a project's environments by running: platform environments -p [id]
You are logged in as dclaverie (...)
To view all commands, run: platform list
dclaverie@nomad $FAQ’s
1. What causes the “cURL error 77” when using the Platform.sh CLI on Rocky Linux 9.5?
This error occurs because the CLI is looking for a certificate file (/etc/ssl/certs/ca-certificates.crt) that does not exist by default on Rocky Linux 9.5.
2. How do I fix the “cURL error 77” issue?
You need to create a symbolic link to the correct CA bundle file. Run the following command:
sudo ln -s /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/ssl/certs/ca-certificates.crt3. Why is the CA certificate file missing in /etc/ssl/certs/?
Rocky Linux 9.5 stores CA certificates under /etc/pki/ca-trust/extracted/pem/ instead of /etc/ssl/certs/. Some applications expect the certificate at /etc/ssl/certs/ca-certificates.crt, which does not exist by default.
4. How do I verify that the fix worked?
After creating the symbolic link, try running the platform command again:
/usr/bin/platformYou should now be able to log in and see your projects without encountering the cURL error.
5. Do I need to repeat this fix after a system update?
Typically, no. However, if you reinstall your system or the CA certificates package is modified, you may need to recreate the symbolic link.
6. Where can I find more information about Platform.sh and its CLI?
You can visit the official links:
Platform.sh PaaS: https://platform.sh/
Platform.sh CLI Git Repository: https://github.com/platformsh/cli