Bitbucket: install existing SSL certificate nightmare

I just finished installing an existing ssl security certificate external to Bitbucket's server. And it was not easy. Here you will find all the commands in the order required to do the job.

openssl pkcs12 -export -name tomcat -in STAR_surfsolutions_com.crt -inkey STAR_surfsolutions_com.key -out STAR_surfsolutions_com.p12
password: changeit
verify: changeit

sudo keytool -importkeystore -srckeystore ~/SSL/STAR_surfsolutions_com.p12 -destkeystore /var/atlassian/application-data/bitbucket/shared/config/ssl-keystore
sudo keytool -list -keystore /var/atlassian/application-data/bitbucket/shared/config/ssl-keystore
Enter destination keystore password: changeit
Re-enter new password: changeit
Enter source keystore password: changeit
Entry for alias tomcat successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelled

Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using “keytool -importkeystore -srckeystore /var/atlassian/application-data/bitbucket/shared/config/ssl-keystore -destkeystore /var/atlassian/application-data/bitbucket /shared/config/ssl-keystore -deststoretype pkcs12”.

Enter keystore password: changeit
Keystore type: jks
Keystore provider: SUN

Your keystore contains 2 entries

tomcat, Jul 1, 2019, PrivateKeyEntry,
Certificate fingerprint (SHA1): D8:EE:52:08:7D:E7:DB:50:07:D9:FE:D4:8E:91:81:E7:CB:41:ED:5C
star_surfsolutions_com, Jul 1, 2019, PrivateKeyEntry,
Certificate fingerprint (SHA1): D8:EE:52:08:7D:E7:DB:50:07:D9:FE:D4:8E:91:81:E7:CB:41:ED:5C

Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using “keytool -importkeystore -srckeystore /var/atlassian/application-data/bitbucket/shared/config/ssl-keystore -destkeystore /var/atlassian/application-data/bitbucket /shared/config/ssl-keystore -deststoretype pkcs12”.

sudo vi /var/atlassian/application-data/bitbucket/shared/bitbucket.properties

server.port=7990
server.ssl.enabled=true
server.ssl.key-store=/var/atlassian/application-data/bitbucket/shared/config/ssl-keystore
server.ssl.key-store-password=changeit
server.ssl.key-password=changeit

sudo /etc/init.d/atlbitbucket restart

less /var/atlassian/application-data/bitbucket/log/atlassian-bitbucket.log

For remote support you need to call: +972-544876933

In order for us to remote control and connect onto your operating system you need to click on the right button that is suitable to your operating system.

Windows

Download AnyDesk

Android

Download AnyDesk

Linux

Download AnyDesk

MacOS

Download AnyDesk