Fix for WSL Ubuntu: Error 60 with cURL and Composer #1259
Closed
its-leoeff511
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to share this for those of you behind a firewall/vpn, that you can't easily disable and in my case Zscaler on Windows using WSL Ubuntu. I was receiving "curl error 60" when running
bin/startandbin/composer update. I had help from issue #930 but wasn't able to get it to work for me due to a few minor steps.If you are using WSL for the first time you may also need to perform similar steps for your Ubuntu host so its about 3 levels of configuration. Key point is that I believe
bin/starterror is running as a OS level cURL command andbin/composerupdate is running the curl extension through PHP.No other steps of downloading a pem from https://curl.se/docs/caextract.html works. It has to be the certificate generated from Zscaler, one other reminder is that the .cer file generated in the following steps is under the hood a .pem file. So it should be named
cacert.pemto match default configurations of the OS level cURL. For PHP cURL at a later step it should be namedcert.pem.The Levels:
Errors returned when running
bin/startor to testbin/root curl -v https://www.google.comError returned when running
bin/composer updateThe Steps
Generating .cer from Zscaler
These are the steps for Windows users to generate the .cer from Zscaler, slightly modified from this Stack Overflow
Make sure the file name is
cacert.pemStep 1
Copy it over from
\srcto containerBelow command places it in the containers
/var/www/htmllocation, it also sets ownership and permissions for you.bin/copytocontainer cacert.pemStep 2: For Container OS Level cURL:
Copy it from
/var/www/htmlto/etc/ssl/certs/withbin/root cp /var/www/html/cacert.pem /etc/ssl/certs/For sanity check:
bin/root ls /etc/ssl/certsStep 3: For Container PHP cURL:
Copy it with:
bin/root cp /etc/ssl/certs/cacert.pem /usr/lib/ssl/cert.pem/usr/lib/sslStep 4: Now test
Curl command
bin/root curl -v https://www.google.com. NO MORE ERROR just a bunch of source code!composer with
bin/composer update. NO MORE ERROR!That's it now go develop stuff.
Reference:
Os Level cURL cert location: /etc/ssl/certs/cacert.pem
PHP level cert location: /usr/lib/ssl/cert.pem
Additional Notes:
You may need to run these commands in your WSL:
sudo apt-get install ca-certificatesbin/root update-ca-certificatesErrors
OC SHIM error
Also if you run into an OC SHIM error when running
bin/starttrybin/removeand runbin/startagain ;)This may be caused by not stopping containers before restartting
Beta Was this translation helpful? Give feedback.
All reactions