POST schema with $ref via HTTPS

Hi,
I am trying to post a schema having reference of another schema with $ref in “items”: {
“properties”: {
“meta.schemaUrl”: {
“$ref”: “”,
getting invalid schema error. But same schema if I try with http (without tls) it is getting posted successfully.
By checking the logs it seems in $ref I am using https url, it is giving ssl handshake error as without $ref I am able to post the schema.
error in logs: unable to find valid certification path to requested target
Can anyone please help on this.
Thanks

Are you doing this with curl or the maven or gradle schema-registry plugins?

Yes ,tried with curl command also with wget.

When I downloaded the reference schema and used that file with $ref it is working.
But with https url in $ref its giving SSL issue.
Is SR support https url in $ref?
Thanks