I have chosen gitblit for my git web gui since they offer a self-contained version that is supposed to run out of the box. Very well, it did. Now everyone attempting to connect to the server via https gets a certificate error and remote cli operations also require a custom flag to not validate the cert.
Since I am also running other web apps which will some day use ssl once they are fully developed, I created a free certificate on https://www.startssl.com/. Now I got 4 files: a private key, a root certificate, an intermediate certificate and my very own certificate for the domain.
I did follow the tutorial at Point.Up.it
> openssl rsa -in your.private.key -out unencrypted.key
> openssl pkcs12 -inkey unencrypted.key -in yourhostcertificate.crt -export -out yourkeystore.p12
> keytool -importkeystore -srckeystore yourkeystore.p12 -srcstoretype pkcs12 -destkeystore serverKeyStore.jks
I was then replacing the generated keystore with the one in gitblit_root/data/.
I was using the default password gitblitfor the keystore, this is also the setting value in gitblit.properties.
But gitblit launch fails with following log lines:
[WARN ] FAILED org.eclipse.jetty.server.Server@5324f3fe: java.io.IOException: Keystore was tampered with, or password was incorrect
[WARN ] FAILED GitblitSslContextFactory@191a9961(/opt/gitblit/data/serverKeyStore.jks,/opt/gitblit/data/serverTrustStore.jks): java.io.IOException: Keystore was tampered with, or password was incorrect
My server details:
OS: Debian
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~deb7u1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
I'd be super grateful for anyone able to guide me in the right direction.