Jira Cloud addon upload fails with An SSL error occurred when we tried to contact the app host

I have a valid certificate emitted by Go Daddy.

From that domain I’m serving an addon from https://myaddon.mydomain.com/atlassian-connect.json with the following hierarchy:

Go Daddy Root Certificate Authority - G2
     |
Go Daddy Secure Certificate Authority - G2
     |
myaddon.mydomain.com

When uploading this application I’m getting the error: An SSL error occurred when we tried to contact the app host at …

Calling the same endpoint from a Java application I got the error about the certificate chain validation:

com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The Go daddy root certificate was already included in the cacerts keystore but not the intermediate. I had to add the latter manually to fix the error.

My guess is the problem here is also that Jira Cloud doesn’t recognize that intermedia certificate.

How can I work around this problem?