Open romanharen1 opened 4 years ago
We had the same issue.
As of limited resources we weren't able to further debug and instead decided to disable the plug in
Hello, I have noticed the same problem, it started when I switched to using gerrit in a container rather than the regular service. I believe the container doesn't have access to the global truststore and since my auth service uses a self-signed SSL cert, the same error occurs when trying to authenticate.
@mhuin Have you resolve this error?
@mhuin Have you resolve this error?
I resolved the issue by using a custom entrypoint script for the gerrit container:
`#!/bin/bash -e
JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom" JAVA_OPTIONS="${JAVA_OPTIONS} -Djavax.net.ssl.keyStore=/var/gerrit/etc/keystore" JAVA_OPTIONS="${JAVA_OPTIONS} -Djavax.net.ssl.keyStorePassword=p4ssw0rd" JAVA_OPTIONS="${JAVA_OPTIONS} -Djavax.net.ssl.trustStore=/var/gerrit/etc/truststore" JAVA_OPTIONS="${JAVA_OPTIONS} -Djavax.net.ssl.trustStorePassword=changeit"
configure_keystore () { keytool -importkeystore -srckeystore /var/gerrit/etc/certificate.pkcs12 \ -srcstoretype PKCS12 -destkeystore /var/gerrit/etc/keystore \ -srcstorepass p4ssw0rd -deststorepass p4ssw0rd
keytool -importcert -alias my-local-ca -file /var/gerrit/etc/localCA.crt \
-keystore /var/gerrit/etc/truststore -storepass changeit -noprompt
}
rm -f /var/gerrit/etc/trustore rm -f /var/gerrit/etc/keystore configure_keystore
if [ -f /var/gerrit/logs/.run_init ]; then echo "Initializing Gerrit site ..." java ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war init -d /var/gerrit --batch --no-auto-start --skip-plugins java ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war reindex -d /var/gerrit cp -f /var/gerrit-plugins/* /var/gerrit/plugins/ rm -f /var/gerrit/logs/.run_init fi
echo "Running Gerrit ..." exec java ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit `
You'll most likely have to adapt this to your own use case. This entrypoint assumes two files, localCA.crt and certificate.pkcs12, are accessible with the correct rights in the /var/gerrit/etc volume. This is how we generate them via ansible, again adapt this to your own setup:
`- name: create PKCS12 bundle for gerrit keystore shell: | cat /etc/pki/tls/certs/certificate.crt /etc/pki/tls/certs/ca-bundle.crt > /tmp/cert-chain.txt openssl pkcs12 -export -inkey /etc/pki/tls/private/certificate.key -in /tmp/cert-chain.txt -out certificate.pkcs12 -passout pass:p4ssw0rd rm -f /tmp/cert-chain.txt
Hi Folks Im getting this error when i try to log in my gerrit:
It was working until today morning
Someone can help me?