본문 바로가기
Linux/Tips&News

An error occurred during the signature verification

by 드로니뚜벅이 2023. 6. 17.

사인키(Signing Key)가 유효기간이 지나갈 경우 아래와 같은 오류가 발생하곤 합니다.

$ sudo apt update
...
Err:15 https://pkg.jenkins.io/debian-stable binary/ Release.gpg
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5BA31D57EF7865CA
...
Fetched 273 kB in 19s (14.4 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
37 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://pkg.jenkins.io/debian-stable binary/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5BA31D57EF5975CA
W: Failed to fetch https://pkg.jenkins.io/debian-stable/binary/Release.gpg  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5BA31D57EF7865CA
W: Some index files failed to download. They have been ignored, or old ones used instead.

당황하지 마시고 해당 사이트의 다운로드 혹은 설치 페이지를 방문하셔서 새로운 키로 업데이트 해 주시면 됩니다. 위에서 발생한 오류는 jenkins 관련 오류이기 때문에 jenkins 사이트(https://pkg.jenkins.io/debian-stable/)에 방문하면 버전별로 업데이트하는 방법과 함께 친절하게 설명되어 있습니다.

우분투(Ubuntu)에서는 아래와 같이 다시 사인키를 등록해 주시면 됩니다.

$ curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
$ echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null

$ sudo apt update