大网数据广告活动
服务器运维问答

GPG signed aptly repository not working as expected

· 52CE 我爱测

We host some of our own software packages as debs in a repository of our own. For prototyping purposes, we’ve been running “unauthenticated”. Now we're trying to do things more correctly and do the whole GPG thing. What I’ve trie…

问题原文

原帖链接 · Travis Griggs · CC BY-SA 3.0

We host some of our own software packages as debs in a repository of our own. For prototyping purposes, we’ve been running “unauthenticated”. Now we're trying to do things more correctly and do the whole GPG thing. What I’ve tried, just for test run is the following:

1) Make a key with gpg-gen

~$ gpg --list-keys
/home/me/.gnupg/pubring.gpg
--------------------------------
pub   4096R/BBBBB39F 2017-03-09
uid                  Someone Somebody <[email omitted]>
sub   4096R/129E9336 2017-03-09

(what btw, is the SUB thing there?)

2) aptly publish... This prompts me for my passphrase for said key, so it must be doing something with the key at that point.

3) export the key using gpg —export —armor > somefile.pubkey

4) copy some file.pubkey over to a test machine

5) run sudo apt-key add somefile.pubkey

sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub   rsa4096 2017-03-09 [SC]
     E51B E216 4658 FB8B 6E42  8A09 F9BC EF4C BBBB B39F
uid           [ unknown] Someone Somebody <[email omitted]>
sub   rsa4096 2017-03-09 [E]
…
…
…

So, it seems to have gotten in there. The sub thing shows up differently now?

6) And finally, sudo apt-get update:

~$ sudo apt-get update
Hit:1 http://ftp.us.debian.org/debian stretch InRelease
Hit:2 http://ftp.us.debian.org/debian stretch-updates InRelease     
Hit:3 http://security.debian.org stretch/updates InRelease          
Get:4 http://our.aptly.repo stretch InRelease [2317 B]
Ign:4 http://our.aptly.repo stretch InRelease            
Fetched 2317 B in 9s (256 B/s)                                                 
Reading package lists... Done
W: GPG error: http://our.aptly.repo stretch InRelease: The following signatures were invalid: E51BE2164658FB8B6E428A09F9BCEF4CBBBBB39F
W: The repository 'http://our.aptly.repo stretch InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I don’t understand what’s happening here. The offense seems to be that something is not signed? What step did I miss?

已采纳解答

原帖链接 · kyrofa · CC BY-SA 3.0

An up-to-date Debian stretch install no longer accepts SHA1 signatures. However, Aptly used SHA1 until v0.9.7 (relevant PR, note that it was also backported to v0.9.6.1). I suspect the version of Aptly you're using is older than that. If so, consider adding their repo to your sources.list.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-03-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。