It seems like you're encountering an SSL handshake error when trying to use Composer through a proxy server and a corporate firewall. This can be a tricky issue to resolve, but here are some steps you can take to troubleshoot and potentially fix the problem:
-
Update cURL and OpenSSL: Ensure that you have the latest versions of cURL and OpenSSL installed, as older versions might not support the necessary protocols or ciphers required by GitHub.
-
Configure Composer to Use the Proxy: If you haven't already, you should configure Composer to use your proxy server. You can do this by setting the
http_proxyandhttps_proxyenvironment variables:export http_proxy=http://proxy.server:port export https_proxy=http://proxy.server:portReplace
proxy.serverandportwith your actual proxy server's address and port number. You can also add these lines to your.bashrcor.bash_profileto make the change permanent. -
Check SSL/TLS Versions: Some corporate firewalls or proxy servers may restrict the SSL/TLS versions that can be used. Make sure that the versions allowed by your proxy and firewall are compatible with what GitHub requires.
-
Verify CA Certificates: The error message indicates that there might be an issue with the CA certificates. Ensure that the CA certificates on your system are up to date. You can update them with the following command:
sudo update-ca-certificates -
Try Using the
--with-all-dependenciesOption: Sometimes, using the--with-all-dependenciesoption with Composer can help resolve connection issues:composer create-project laravel/laravel your-project-name --with-all-dependencies -
Use the
-vvvOption for Verbose Output: Running Composer with the-vvvoption can give you more detailed output, which might help identify the issue:composer create-project laravel/laravel your-project-name -vvv -
Check for Firewall/Proxy Restrictions: Double-check with your IT department to ensure that there are no additional restrictions on your firewall or proxy that could be causing the issue.
-
Test with cURL Directly: Try connecting to GitHub's API using cURL directly to see if you can replicate the issue outside of Composer:
curl -v https://api.github.com -x http://proxy.server:portReplace
proxy.serverandportwith your actual proxy server's address and port number. This can help you determine if the issue is with Composer or with the proxy/firewall settings.
If none of these steps resolve the issue, it might be helpful to reach out to Composer's support or check GitHub's status to see if there are any ongoing issues that could be affecting your connection.