Ssl – gitlab SSL configuration / certificate verification failed

composerlets-encryptsslssl-certificate

I have my own gitlab server, now secured with an letsencrypt SSL certificate.

Now, I want to publish some packages via packagist. But when I enter the git repository url in packagist, I got the following error message (urls changed):

Uncaught Exception: [RuntimeException] Failed to execute git clone --mirror 'https://url.de/gituser/repository.git' '/home/composer/.composer/cache/vcs/https---url.de-gituser-repository' Cloning into bare repository '/home/composer/.composer/cache/vcs/https---url.de-gituser-repository'... fatal: unable to access 'https://url.de/gituser/repository.git': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 

Each browser accepts the certificate. But not composer/packagist.

Any Ideas why?

Best Answer

Ok, I just found my mistake. I have used cert.pem instead of fullchain.pem.

Explained here: https://stackoverflow.com/questions/34189199/how-do-i-use-let-s-encrypt-with-gitlab