Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 5881  / 3 Years ago, thu, september 9, 2021, 3:50:33

Is it possible to use the public-gpg-key import feature of apt-add-repository with my own reprepro repository? Is there e.g. something like a default key server where apt-add-repository expects to find the keys or a path within the (http) repository where it will look for it?


More From » apt

 Answers
0

Both apt-add-repository and add-apt-repository have a -k option you can use to specify your own public keyring repository. apt-key can add the fingerprint of the key you control and trust. Of course you can simply add a public key to the keyserver.ubuntu.com or other keyserver rather than using your own keyserver, but apt still must be told they key fingerprints. See Saji89's helpful answer about apt-key at https://askubuntu.com/a/217529/63886 (and vote it up if it proves useful to you).



You can also use medibuntu's approach as automation if many computers are involved. Here's how medibuntu.org does it:



sudo -E wget --output-document=/etc/apt/sources.list.d/medibuntu.list  http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update `


That is followed up by installing a couple more packages once the repo has been added.






As explanation:



sudo -E wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list`


adds the repo itself to your configuration.



sudo apt-get --quiet update


Updates the apt-get information from the new (and all other repos).



sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring


Installs the public key for the repository. The --allow-unauthenticated is how you avoid the chicken and egg problem.



sudo apt-get --quiet update



Updates apt again.



Then application data and debugging hooks packages are added for their applications.



You can browse their repo http://packages.medibuntu.org/ to see how their packages do the job.


[#29705] Friday, September 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oargrou

Total Points: 336
Total Questions: 105
Total Answers: 113

Location: Vietnam
Member since Sun, Oct 18, 2020
4 Years ago
;