在我的仿生“客户端”上,我得到:
请注意,它说的是“无效”,而不是缺失!
这些是我自己的 .deb 包,收集在一个仓库中。 (对于 trusty 和 xenial 版本都可以正常工作)
我使用类似以下方式签署了该仓库:(通过 reprepro 的 conf/distributions 进行调用)
好的,我试过了:
任何关于我可能遗漏的线索,都将受到欢迎... 谢谢,
/holger 解决方法:
最终我按照指南(https://www.digitalocean.com/community/tutorials/how-to-use-reprepro-for-a-secure-package-repository-on-ubuntu-14-04)进行操作 ----> 大致如此。 ----> 仍然有些'正在进行中',但这里有一些提示:
使用一个(全新的)Docker镜像:
时间关键的事情。 使用现有的钥匙:
好的,是时候进行reprepro设置了:
测试一下:
现在,如果你在客户端上共享/debs/u18repo(使用httpd),并使用以下命令导入密钥:apt-key add http:/.../keyfile 然后运行apt update应该可以正常工作...
GPG error: http://repo.localpod/Dml/ldom-debs/ubuntu bionic InRelease: The following signatures were invalid: ADE541A20ACF8997C01BDCF7090678A30132048A
请注意,它说的是“无效”,而不是缺失!
这些是我自己的 .deb 包,收集在一个仓库中。 (对于 trusty 和 xenial 版本都可以正常工作)
我使用类似以下方式签署了该仓库:(通过 reprepro 的 conf/distributions 进行调用)
gpg --batch --yes --keyring $KeyP --secret-keyring $KeyS -a --no-permission-warning --detach-sign --default-key 'ldom install service' --output $3 $1
$1 = .../Release
$2 = .../InRelease
好的,我试过了:
wget http://repo.localpod/Dml/ldom-debs/ubuntu/dists/bionic/InRelease
and:
# gpgv --keyring /etc/apt/trusted.gpg "InRelease"
gpgv: Signature made Thu 24 May 2018 12:20:29 PM CEST
gpgv: using DSA key 090678A30132048A
gpgv: Good signature from "ldom install service <tbuunix@...dk>"
这不是 apt-get 如何检查签名的方式吗?还是密钥太旧了?类型错误?
完整错误信息:
apt-key list
pub rsa2048 2014-06-24 [SC]
754A 1A7A E731 F165 D5E6 D4BD 0E08 A149 DE57 BFBE
uid [ unknown] SaltStack Packaging Team <packaging@saltstack.com>
sub rsa2048 2014-06-24 [E]
pub dsa1024 2013-06-10 [SCA]
ADE5 41A2 0ACF 8997 C01B DCF7 0906 78A3 0132 048A
uid [ unknown] LDOM install service <tbuunix@....dk>
sub elg1024 2013-06-10 [E]
root@ubu18:~# apt-get update
Get:1 http://repo.localpod/Dml/ldom-debs/ubuntu bionic InRelease [1,154 B]
Err:1 http://repo.localpod/Dml/ldom-debs/ubuntu bionic InRelease
The following signatures were invalid: ADE541A20ACF8997C01BDCF7090678A30132048A
Reading package lists... Done
W: GPG error: http://repo.localpod/Dml/ldom-debs/ubuntu bionic InRelease: The following signatures were invalid: ADE541A20ACF8997C01BDCF7090678A30132048A
E: The repository 'http://repo.localpod/Dml/ldom-debs/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
任何关于我可能遗漏的线索,都将受到欢迎... 谢谢,
/holger 解决方法:
最终我按照指南(https://www.digitalocean.com/community/tutorials/how-to-use-reprepro-for-a-secure-package-repository-on-ubuntu-14-04)进行操作 ----> 大致如此。 ----> 仍然有些'正在进行中',但这里有一些提示:
使用一个(全新的)Docker镜像:
docker run -it -v /your/packages:/debs ubuntu:18.04
apt update
apt install -y vim inetutils-ping curl wget netcat telnet aptitude man manpages bash-completion rng-tools reprepro iproute2
rebuild your packages:
cd /debs/src
ls -d */DEBIAN | xargs -n1 dirname | xargs -n1 dpkg-deb -vD --build
时间关键的事情。 使用现有的钥匙:
gpg --import /debs/.../secring.gpg
获取一个新的密钥:
gpg --full-generate-key
#rsa 4
#bits 4096
#your_key_name
#passphrase
#
gpg --edit-key your_key_name
#addkey
#(4) RSA (sign only)
#4096
#0
#yes
#yes
#save
gpg --list-secret
gpg --list-key
gpg --export .....your..key.....number............... > keyfile
apt-key add keyfile
好的,是时候进行reprepro设置了:
mkdir /debs/u18repo
cd /debs/u18repo
cat <<END >conf/options
ask-passphrase
END
cat <<END >conf/distributions
Codename: bionic
Components: main
Architectures: amd64
SignWith: .....your..key.....number...............
END
reprepro -b /debs/u18repo includedeb bionic /debs/src/*.deb
gpg --export .....your..key.....number............... > keyfile
测试一下:
apt-key add keyfile
echo "deb file:////debs/u18repo/ bionic main" >> "/etc/apt/sources.list"
apt update
现在,如果你在客户端上共享/debs/u18repo(使用httpd),并使用以下命令导入密钥:apt-key add http:/.../keyfile 然后运行apt update应该可以正常工作...