我访问的所有关键服务器都在超时。我需要在不检查公钥签名的情况下安装软件包。是否有办法绕过所有签名检查/忽略所有签名错误或愚蠢地认为签名已通过?
是危险的
发布于 2011-11-01 12:55:26
将--allow-unauthenticated选项传递给apt-get,如下所示:
sudo apt-get --allow-unauthenticated upgrade来自apt-get手册页:
-允许-未经验证的忽略如果包不能进行身份验证,并且不提示它。这对于像pbuilder这样的工具很有用。配置项: APT::Get::AllowUnauthenticated。
通过在/etc/apt/apt.conf.d/ dir上使用您自己的配置文件,可以使此设置永久化。文件名可以是99myown,它可能包含以下行:
APT::Get::AllowUnauthenticated "true";这样,您不需要每次安装软件时都使用该选项。注意:我不建议默认设置此选项,它绕过可能允许对手危害计算机的签名检查。
发布于 2017-09-01 20:07:30
如果您试图从存储库获得一个包,其中他们打包了密钥,并将它们包含在存储库中,而没有其他地方,那么使用dpkg下载和安装密钥/密钥环包可能非常烦人,而且很难以一种易于编写脚本和可重复的方式这样做。
如果您可以从密钥服务器安装密钥或通过https从受信任的源下载密钥,则不建议使用以下脚本,但如果您没有任何其他方法,则可以使用此脚本。
echo "deb http://your.repo.domain/repository/ $(lsb_release -c -s) universe" | sudo tee /etc/apt/sources.list.d/your-repo-name.list
sudo apt -o Acquire::AllowInsecureRepositories=true \
-o Acquire::AllowDowngradeToInsecureRepositories=true \
update
## if the 'apt update' above fails it is likely due to previously
## having the GPG key and repository on the system, you can clean
## out the old lists with `sudo rm /var/lib/apt/lists/your.repo.domain*`
apt-get -o APT::Get::AllowUnauthenticated=true install repo-keyring-pkgname
## If you ever run `sudo apt-key del your-repos-keyID`
## you may have to `sudo apt remove --purge repo-keyring-pkgname`
## Update should run without the GPG warnings now that the key is installed
apt-get update
apt-get install somepkg-from-repo我最初把它放在一起是因为i3在他们的sur5r回购中这样做,但是后来我发现他们的密钥在keyserver.ubuntu.com列表中,所以我只需要sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E3CA1A89941C42E6,就可以避免所有额外的包麻烦。
发布于 2019-06-11 15:32:25
我在老debian服务器上也遇到了同样的问题。我不能做一个
apt-get update
这给了我以下错误:
E: Release file expired, ignoring http://archive.debian.org/debian/dists/squeeze-lts/Release (invalid since 1183d 0h 2min 51s)
最后,解决方案是添加以下内容:
Acquire::Check-Valid-Until false;
到/etc/apt/apt.conf (如果不存在就创建它)。在此之后,错误变成了一个简单的警告。
我想它可能也适用于ubuntu。
请注意它完全不安全。
https://askubuntu.com/questions/74345
复制相似问题