# Invalid GPG key for apt repo

**URL:** <https://community.zymbit.com/t/invalid-gpg-key-for-apt-repo/1697>\
**Category:** GENERAL\
**Created:** [September 30, 2024, 6:10am UTC](https://community.zymbit.com/t/invalid-gpg-key-for-apt-repo/1697 "2024-09-30T06:10:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptaag](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.zymbit.com/ptaag/32/1184_2.png) [@ptaag](https://community.zymbit.com/u/ptaag)\
**Post date:** [September 30, 2024, 6:10am UTC](https://community.zymbit.com/t/invalid-gpg-key-for-apt-repo/1697/1 "2024-09-30T06:10:27Z")

</div>

Hello Zymbit team,

Looks like GPG key for apt repo is expired or invalid.  
I have got an error during run of install\_zk\_sw.sh scirpt:

> W: GPG error: **zk-sw-repo.s3** \*\*\*\*\*\*/apt-repo-bookworm-aarch64 bookworm InRelease: The following signatures were invalid: EXPKEYSIG CAA5E9C8755D21A0 [scott@zymbit.com](mailto:scott@zymbit.com)  
> E: The repository ‘_ **zk-sw-repo.s3.** _\*\*/apt-repo-bookworm-aarch64 bookworm InRelease’ is not signed.

Can you take a look and maybe re-new the key to let this script work as expected?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![davidgs](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.zymbit.com/davidgs/32/1192_2.png) [@davidgs](https://community.zymbit.com/u/davidgs)\
**Post date:** [September 30, 2024, 12:17pm UTC](https://community.zymbit.com/t/invalid-gpg-key-for-apt-repo/1697/2 "2024-09-30T12:17:41Z")

</div>

Hi @ptaag

Thanks for pointing this out! We will get right on this and let you know as soon as it’s resolved.

Best Regards,  
dg

---

<div class="post-metadata">

**Author:** ![Bob\_of\_Zymbit](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Bob\_of\_Zymbit](https://community.zymbit.com/u/Bob_of_Zymbit)\
**Post date:** [October 1, 2024, 12:47am UTC](https://community.zymbit.com/t/invalid-gpg-key-for-apt-repo/1697/3 "2024-10-01T00:47:30Z")

</div>

@ptaag Thank you. The expiration date for the key was Sept 30, 2024. We’ve updated the key with a new expiration date of 2028. All new installations will use the new public key.

If you are doing an apt update or re-install, your local key will need updating. You can get the new key with:

```auto
curl -L https://zk-sw-repo.s3.amazonaws.com/apt-zymkey-pubkey.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/zymbit.gpg

```

For those of you that are on older installations, make sure the `signed-by` option is included in the `/etc/apt/sources.list.d/zymbit.list`,

This parameter - `[signed-by=/usr/share/keyrings/zymbit.gpg]`

The following will check and fix for you,

```bash
sudo sed -i 's/^deb https/deb [signed-by=\/usr\/share\/keyrings\/zymbit.gpg] https/' /etc/apt/sources.list.d/zymbit.list

```

---

<div class="post-metadata">

**Author:** ![ptaag](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.zymbit.com/ptaag/32/1184_2.png) [@ptaag](https://community.zymbit.com/u/ptaag)\
**Post date:** [October 1, 2024, 7:36am UTC](https://community.zymbit.com/t/invalid-gpg-key-for-apt-repo/1697/4 "2024-10-01T07:36:35Z")

</div>

Awesome, thank you for such quick resolution of this issue.

If you want to be aware of such cases in future, maybe you can consider some monitoring/alerting tool to check date for GPG keys/SSL certs and re-new them couple of days before they will expire?
