From 30ddcacb4e3aefb0010a8840a9f8b68d96c97443 Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 18 Mar 2024 18:30:17 +0800 Subject: [PATCH] +deb12-skip-gpg-check.md up skip-gpg-check.md UP format - http://ftp.debian.org/debian/ #v12.5 mv deb12-skip-gpg-check.md deb12-gpg: +**ubt2404** deb12-gpg: +ubt2204 deb12-gpg: merge cat > /etc/apt/apt.conf.d/skip-gpg-check-ig --- deb12-skip-gpg-check.md | 328 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 328 insertions(+) create mode 100644 deb12-skip-gpg-check.md diff --git a/deb12-skip-gpg-check.md b/deb12-skip-gpg-check.md new file mode 100644 index 00000000..b443d636 --- /dev/null +++ b/deb12-skip-gpg-check.md @@ -0,0 +1,328 @@ + +- http://ftp.debian.org/debian/ #v12.5 +- https://mirrors.ustc.edu.cn/help/debian.html 中国科学技术大学 +- https://mirrors4.tuna.tsinghua.edu.cn/help/debian/ #err /etc/apt/sources.list + +**try1** + +```bash +# AI@baidu: debian12 跳过GPG检查 +debian12 跳过GPG检查 +在Debian 12 (codenamed "Bookworm") 中,如果你想要临时跳过GPG签名检查,可以在APT命令中添加--allow-unauthenticated选项。这样做通常是不推荐的,因为它会跳过所有的包的GPG签名验证,可能会引入安全风险。 + +例如,当你尝试安装一个未被Debian官方GPG密钥认证的包时,可以这样做: +# sudo apt-get install --allow-unauthenticated package-name +# /etc/apt/apt.conf.d/ + +cat > /etc/apt/apt.conf.d/skip-gpg-check < /etc/apt/apt.conf.d/skip-gpg-check02 < /etc/apt/apt.conf.d/10unauthenticated < /etc/apt/apt.conf.d/skip-gpg-check-ig < -o Acquire::AllowInsecureRepositories=true \ +> -o Acquire::AllowDowngradeToInsecureRepositories=true \ +> update +Get:1 http://mirrors.ustc.edu.cn/debian bookworm InRelease [151 kB] +Ign:1 http://mirrors.ustc.edu.cn/debian bookworm InRelease +Get:2 http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease [55.4 kB] +Ign:2 http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease +Get:3 http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease [48.0 kB] +Get:4 http://mirrors.ustc.edu.cn/debian bookworm/main amd64 Packages [8786 kB] +Ign:3 http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease +Get:5 http://mirrors.ustc.edu.cn/debian bookworm/main Translation-en [6109 kB] +Get:6 http://mirrors.ustc.edu.cn/debian bookworm-updates/main amd64 Packages [12.7 kB] +Get:7 http://mirrors.ustc.edu.cn/debian bookworm-updates/main Translation-en [13.8 kB] +Get:8 http://mirrors.ustc.edu.cn/debian-security bookworm-security/main amd64 Packages [150 kB] +Get:9 http://mirrors.ustc.edu.cn/debian-security bookworm-security/main Translation-en [90.3 kB] +Fetched 15.4 MB in 4s (4267 kB/s) +Reading package lists... Done +Building dependency tree... Done +Reading state information... Done +37 packages can be upgraded. Run 'apt list --upgradable' to see them. +W: GPG error: http://mirrors.ustc.edu.cn/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY F8D2585B8783D481 +W: The repository 'http://mirrors.ustc.edu.cn/debian bookworm 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. +W: GPG error: http://mirrors.ustc.edu.cn/debian bookworm-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 +W: The repository 'http://mirrors.ustc.edu.cn/debian bookworm-updates 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. +W: GPG error: http://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8 +W: The repository 'http://mirrors.ustc.edu.cn/debian-security bookworm-security 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. +root@757b916af624:/etc/apt/apt.conf.d# apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true install tree +Reading package lists... Done +Building dependency tree... Done +Reading state information... Done +tree is already the newest version (2.1.0-1). +0 upgraded, 0 newly installed, 0 to remove and 37 not upgraded. + +# try ins: +# root@757b916af624:/etc/apt/apt.conf.d# apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true install arandr +# +dpkg-deb (subprocess): decompressing archive '/var/cache/apt/archives/python3.11-minimal_3.11.2-6_amd64.deb' (size=2064032) member 'control.tar': lzma error: Cannot allocate memory +tar: This does not look like a tar archive +tar: Exiting with failure status due to previous errors +dpkg-deb: error: tar subprocess returned error exit status 2 +dpkg: error processing archive /var/cache/apt/archives/python3.11-minimal_3.11.2-6_amd64.deb (--unpack): + dpkg-deb --control subprocess returned error exit status 2 +Errors were encountered while processing: + /var/cache/apt/archives/libpython3.11-minimal_3.11.2-6_amd64.deb + /var/cache/apt/archives/python3.11-minimal_3.11.2-6_amd64.deb +E: Sub-process /usr/bin/dpkg returned an error code (1) + + + +# root@757b916af624:/etc/apt/apt.conf.d# apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true install plank +# +dpkg-deb (subprocess): decompressing archive '/tmp/apt-dpkg-install-Qodb4n/11-plank_0.11.89-4+b1_amd64.deb' (size=148908) member 'control.tar': lzma error: Cannot allocate memory #需特权模式 +tar: This does not look like a tar archive +tar: Exiting with failure status due to previous errors +dpkg-deb: error: tar subprocess returned error exit status 2 +dpkg: error processing archive /tmp/apt-dpkg-install-Qodb4n/11-plank_0.11.89-4+b1_amd64.deb (--unpack): + dpkg-deb --control subprocess returned error exit status 2 +Errors were encountered while processing: + /tmp/apt-dpkg-install-Qodb4n/00-libbamf3-2_0.5.6+repack-1_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/01-libxres1_2%3a1.2.1-1_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/02-libwnck-3-common_43.0-3_all.deb + /tmp/apt-dpkg-install-Qodb4n/03-libwnck-3-0_43.0-3_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/04-bamfdaemon_0.5.6+repack-1_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/05-libdbusmenu-glib4_18.10.20180917~bzr492+repack1-3_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/06-libdbusmenu-gtk3-4_18.10.20180917~bzr492+repack1-3_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/07-libgee-0.8-2_0.20.6-1_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/08-libgnome-menu-3-0_3.36.0-1.1_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/09-libplank-common_0.11.89-4_all.deb + /tmp/apt-dpkg-install-Qodb4n/10-libplank1_0.11.89-4+b1_amd64.deb + /tmp/apt-dpkg-install-Qodb4n/11-plank_0.11.89-4+b1_amd64.deb +E: Sub-process /usr/bin/dpkg returned an error code (1) +``` + +**try3** + +```bash +# --privileged 特权模式即OK +root @ deb1013 in ~ |01:52:56 +$ docker run -it --rm --privileged debian:12 + + cd /etc/apt/apt.conf.d/ + mkdir ../_01 + mv * ../_01/ + cat > /etc/apt/apt.conf.d/skip-gpg-check02 < /etc/apt/apt.conf.d/skip-gpg-check-ig < /etc/apt/apt.conf.d/skip-gpg-check02 < /etc/apt/apt.conf.d/skip-gpg-check-ig < /etc/apt/sources.list \ + && echo "deb http://${DOMAIN}/$target jammy-updates main restricted universe multiverse">> /etc/apt/sources.list; +# (还未单用sources.list.d); gpg-check同2404: +cd /etc/apt/apt.conf.d/ +mkdir ../_01; mv * ../_01/ +# cat > /etc/apt/apt.conf.d/skip-gpg-check02 < /etc/apt/apt.conf.d/skip-gpg-check-ig < /etc/apt/apt.conf.d/skip-gpg-check-ig <