Step 1:
Run the standard keytool to import the certificate to JVM
keytool -import -alias
When prompted Enter keystore password:, enter “changeit”
When prompted Trust this certificate? [no]:, enter “yes”
Step 2:
Start IntelliJ
On IntelliJ op goto Setting -> Tools -> Server Certificates
On the box Accepted certificates click the plus icon (+)
Search the certificate filename and click Apply and OK