Sample Header Ad - 728x90

How do you generate a keyring file for a local APT repository?

0 votes
0 answers
185 views
Based on [this answer](https://unix.stackexchange.com/a/775900/384822) , I followed [this guide](https://earthly.dev/blog/creating-and-hosting-your-own-deb-packages-and-apt-repo/) to create a local apt repository. Now I an specifying that debootstrap use my repository with file:path/to/my/apt/repo. When debootstrap runs, I get this:
I: Target architecture can be executed
I: Retrieving InRelease 
I: Checking Release signature
E: Release signed by unknown key (key id ***REDACTED***)
   The specified keyring /files/raspberrypi.gpg may be incorrect or out of date.
   You can find the latest Debian release key at https://ftp-master.debian.org/keys.html 
For some background, I am using [pi-gen](https://github.com/RPi-Distro/pi-gen) to generate raspberry pi images. They provide a file called raspberrypi.gpg, which I believe is the keyring for raspbian.raspberrypi.com. However, I want to use my local apt repo instead of the public internet one. So I am replacing http://raspbian.raspberrypi.com/raspbian with file:path/to/my/apt/repo so that debootstrap will be able to pull packages from my local apt repo instead of pulling them from the internet. So essentially I think I need to create an equivalent my-apt-repo.gpg file, but all I have after following the above linked tutorial is the following: - Release, which I think is the header of my apt repo - Release.gpg, which I think is a signed version of Release - InRelease, which I think is a combination of Release and Release.gpg - my-pgp-key.private which is the private key I used to sign the Release file - my-pgp-key.public which is the public key corresponding to the private key So somehow from these I think I need to create my-apt-repo.gpg which should allow me to actually use the apt repo. But I do not know how to create this file.
Asked by nullromo (111 rep)
Jan 14, 2025, 11:11 PM
Last activity: Jan 15, 2025, 08:38 PM