Linuxiarze.pl Forum

Dystrybucje Linux => Debian => Wątek zaczęty przez: mirekc w Wrzesień 25, 2024, 08:24:28 AM

Tytuł: Debian 12, apt update – problem z certyfikatem
Wiadomość wysłana przez: mirekc w Wrzesień 25, 2024, 08:24:28 AM
W nowej instalacji Debiana 12 wywołanie polecenia ,,apt update" za każdym razem generuje błędy.
apt update
Ign:1 http://security.debian.org/debian-security bookworm-security InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://security.debian.org/debian-security bookworm-security InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Ign:1 http://security.debian.org/debian-security bookworm-security InRelease
Ign:2 http://deb.debian.org/debian bookworm InRelease
Ign:3 http://deb.debian.org/debian bookworm-updates InRelease
Err:1 http://security.debian.org/debian-security bookworm-security InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: xxx.xxx.xxx.xxx 443]
Err:2 http://deb.debian.org/debian bookworm InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: xxx.xxx.xxx.xxx 443]
Err:3 http://deb.debian.org/debian bookworm-updates InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: xxx.xxx.xxx.xxx 443]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: xxx.xxx.xxx.xxx 443]
W: Failed to fetch http://security.debian.org/debian-security/dists/bookworm-security/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: xxx.xxx.xxx.xxx 443]
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: xxx.xxx.xxx.xxx 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Plik /etc/apt/sources.list wygląda tak (niezmieniany po świeżej instalacji, z wyjątkiem ,,zahaszowania" DVD):
# deb cdrom:[Debian GNU/Linux 12.7.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20240831-10:40]/ bookworm co
ntrib main non-free-firmware

deb http://deb.debian.org/debian/ bookworm main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware

# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
Polecenie apt ma rację, emitent certyfikatu jest nieznany, bo to jest mój gateway, który wystawia certyfikat podpisany przez siebie samego. Niestety póki co tak musi pozostać.

Jak zrobić, żeby pomimo takiego certyfikatu polecenie apt działało poprawnie? Próbowałem różnych ,,sztuczek" z Internetu, ale bez rezultatu. O ile wiem, w starszych wersjach Debiana nie było tego problemu.
Tytuł: Odp: Debian 12, apt update – problem z certyfikatem
Wiadomość wysłana przez: linux4ever w Wrzesień 25, 2024, 09:13:21 AM
Zobacz apt-get update a potem apt-update i apt upgrade.

Możesz też zmienić server lustrzany na szybszy przez netselect-apt.

Więcej pomysłów nie mam.

PS: Czytałem że czasem apt-update nie działa dlatego trzeba apt-get update.





Tytuł: Odp: Debian 12, apt update – problem z certyfikatem
Wiadomość wysłana przez: mirekc w Wrzesień 25, 2024, 09:29:34 AM
Cytat: linux4ever w Wrzesień 25, 2024, 09:13:21 AMZobacz apt-get update a potem apt-update i apt upgrade.

Możesz też zmienić server lustrzany na szybszy przez netselect-apt.

Więcej pomysłów nie mam.

PS: Czytałem że czasem apt-update nie działa dlatego trzeba apt-get update.
apt-get update też nie działa, komunikaty błędów te same.

netselect mam niezainstalowany, zainstalować nie mogę, pojawiają się te same błędy weryfikacji certyfikatu.
Tytuł: Odp: Debian 12, apt update – problem z certyfikatem
Wiadomość wysłana przez: linux4ever w Wrzesień 25, 2024, 09:36:16 AM
Cytat: mirekc w Wrzesień 25, 2024, 09:29:34 AM
Cytat: linux4ever w Wrzesień 25, 2024, 09:13:21 AMZobacz apt-get update a potem apt-update i apt upgrade.

Możesz też zmienić server lustrzany na szybszy przez netselect-apt.

Więcej pomysłów nie mam.

PS: Czytałem że czasem apt-update nie działa dlatego trzeba apt-get update.
apt-get update też nie działa, komunikaty błędów te same.

netselect mam niezainstalowany, zainstalować nie mogę, pojawiają się te same błędy weryfikacji certyfikatu.

A  czy możesz ustawić klucz weryfikacji aktualizacji taki gpg jak normalnie w systemie.

Tu jak wygenerować :

https://keyring.debian.org/creating-key.html

Tytuł: Odp: Debian 12, apt update – problem z certyfikatem
Wiadomość wysłana przez: mirekc w Wrzesień 25, 2024, 10:35:01 AM
Cytat: linux4ever w Wrzesień 25, 2024, 09:36:16 AMA  czy możesz ustawić klucz weryfikacji aktualizacji taki gpg jak normalnie w systemie.

Tu jak wygenerować :

https://keyring.debian.org/creating-key.html
gpg też mam niezainstalowany (patrz wyżej). Ale zakładając że jakoś zainstaluję i wygeneruję ten klucz, czy to na pewno pomoże? Polecenie apt ,,czepia się" certyfikatu mojego firewall-a (a nie repozytoriów), a tego zmienić nie mogę.

Czy nie da się jakoś globalnie wyłączyć walidacji certyfikatu źródła? To wygląda na jakiś nowy ,,ficzer". Mam w swojej sieci MX 23.4 (na Debianie 12) oraz kilka innych dystrybucji Linuksa i nigdzie ten problem nie występuje. ,,Czystego" Debiana mi się zachciało...
Tytuł: Odp: Debian 12, apt update – problem z certyfikatem
Wiadomość wysłana przez: mirekc w Wrzesień 25, 2024, 11:41:18 AM
Żeby było jeszcze ciekawiej: mam drugą maszynę z Debianem 12.7 (i też sam ją stawiałem) gdzie problem nie występuje. Ta sama procedura instalacji, ta sama sieć, dokładnie ta sama wersja jądra itp. Jedyna różnica jest taka, że ta maszyna była postawiona dawniej z obrazu ISO prawdopodobnie 12.5 i aktualizowana, a ta nowa od razu z ISO 12.7. Ki diabeł?
Tytuł: Odp: Debian 12, apt update – problem z certyfikatem
Wiadomość wysłana przez: mirekc w Wrzesień 25, 2024, 11:51:35 AM
Problem rozwiązany. Maszyna nie miała pełnego dostępu do Internetu (blokowanie na firewallu) a komunikaty kompletnie mnie zmyliły. Nie było tematu.