# Error: self-signed certificate in certificate chain

**URL:** https://discuss.kotlinlang.org/t/error-self-signed-certificate-in-certificate-chain/28874
**Category:** Native
**Created:** [July 9, 2024, 11:26am UTC](https://discuss.kotlinlang.org/t/error-self-signed-certificate-in-certificate-chain/28874 "2024-07-09T11:26:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wucong1997](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@wucong1997](https://discuss.kotlinlang.org/u/wucong1997)
#### Post date: [July 9, 2024, 11:26am UTC](https://discuss.kotlinlang.org/t/error-self-signed-certificate-in-certificate-chain/28874/1 "2024-07-09T11:26:49Z")

</div>

Hi, When compiling Kotlin native on Linux, run. /gradlew publish, the following error occurs: “self-signed certificate in certificate chain”. How to deal with this kind of problem?

![image](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/a/a6e9cb80c67a907122bedf3a3f367cfe6cfa7857.png)

---

<div class="post-metadata">

### Author: ![Skater901](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/skater901/32/10163_2.png) [@Skater901](https://discuss.kotlinlang.org/u/Skater901)
#### Post date: [July 12, 2024, 11:58am UTC](https://discuss.kotlinlang.org/t/error-self-signed-certificate-in-certificate-chain/28874/2 "2024-07-12T11:58:06Z")

</div>

This is a Gradle/SSL problem, nothing to do with Kotlin. You’ll have to do some web searching to find the answer. Since it’s the publish task that’s failing, I assume it’s trying to push artifacts to a remote repository (Maven Central, or something?), and failing due to the self-signed certificate error.
