Platform.sh CLI Installer [cURL error 77]

February 15, 2025

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: none

Thankfully, it’s a simple fix.

Steps

  1. I used curl to install the Platform.sh CLI:
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash
  1. After installing, I ran the platform command (aliased below as p) 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 $
  1. 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 $
  1. 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 $
  1. 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 $
  1. Issue the platform command 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.crt

3. 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/platform

You 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


Profile picture

Written by Damon Claverie , an avid trail runner, nature enthusiast, and currently working remotely from SE Queensland, Australia.