# How to give s3 client and server certificates to s3 repository client

**URL:** <https://discuss.elastic.co/t/how-to-give-s3-client-and-server-certificates-to-s3-repository-client/218518>\
**Category:** Elasticsearch\
**Created:** [February 10, 2020, 6:20am UTC](https://discuss.elastic.co/t/how-to-give-s3-client-and-server-certificates-to-s3-repository-client/218518 "2020-02-10T06:20:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bikkina\_mahesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bikkina_mahesh/32/49176_2.png) [@bikkina\_mahesh](https://discuss.elastic.co/u/bikkina_mahesh)\
**Post date:** [February 10, 2020, 6:20am UTC](https://discuss.elastic.co/t/how-to-give-s3-client-and-server-certificates-to-s3-repository-client/218518/1 "2020-02-10T06:20:21Z")

</div>

I am trying to create s3 client

PUT \_snapshot/my\_s3\_repository  
{  
"type": "s3",  
"settings": {  
"bucket": "test1",  
"endpoint": "[s3.tally.com](http://s3.tally.com)",  
"access\_key": "_**",  
"secret\_key": "**_"  
}  
}

Getting following error

{  
"error": {  
"root\_cause": [  
{  
"type": "repository\_verification\_exception",  
"reason": "[my\_s3\_repository] path is not accessible on master node"  
}  
],  
"type": "repository\_verification\_exception",  
"reason": "[my\_s3\_repository] path is not accessible on master node",  
"caused\_by": {  
"type": "i\_o\_exception",  
"reason": "Unable to upload object [tests-ZUR6RvRpQoONFdtL972LCw/master.dat] using a single upload",  
"caused\_by": {  
"type": "sdk\_client\_exception",  
"reason": "Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",  
"caused\_by": {  
"type": "s\_s\_l\_handshake\_exception",  
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",  
"caused\_by": {  
"type": "validator\_exception",  
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",  
"caused\_by": {  
"type": "sun\_cert\_path\_builder\_exception",  
"reason": "unable to find valid certification path to requested target"  
}  
}  
}  
}  
}  
},  
"status": 500  
}

---

<div class="post-metadata">

**Author:** ![Armin\_Braun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/armin_braun/32/20092_2.png) [@Armin\_Braun](https://discuss.elastic.co/u/Armin_Braun)\
**Post date:** [February 10, 2020, 6:42am UTC](https://discuss.elastic.co/t/how-to-give-s3-client-and-server-certificates-to-s3-repository-client/218518/2 "2020-02-10T06:42:44Z")

</div>

Hi @bikkina_mahesh

This appears to be a problem with your JVM's truststore not having the right certificate chain for `s3.tally.com` imported.

You will have to add the certificate of `s3.tally.com` to the truststore by using Java's [keytool](https://docs.oracle.com/cd/E19906-01/820-4916/geygn/index.html).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 9, 2020, 6:42am UTC](https://discuss.elastic.co/t/how-to-give-s3-client-and-server-certificates-to-s3-repository-client/218518/3 "2020-03-09T06:42:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
