GPG error

gpg-error
bazel

#1

bazel 설치후 apt-get update 시 GPG 오류 메시지 발생

오류 메시지

# apt-get update
Get:1 http://storage.googleapis.com/bazel-apt stable InRelease [2,450 B]
Hit:2 https://download.docker.com/linux/ubuntu xenial InRelease                                                                              
Err:1 http://storage.googleapis.com/bazel-apt stable InRelease                                                                       
  The following signatures were invalid: KEYEXPIRED 1527185977  KEYEXPIRED 1527185977  KEYEXPIRED 1527185977
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease                                                                           
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]        
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]      
Fetched 323 kB in 1s (184 kB/s)                             
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://storage.googleapis.com/bazel-apt stable InRelease: The following signatures were invalid: KEYEXPIRED 1527185977  KEYEXPIRED 1527185977  KEYEXPIRED 1527185977
W: Failed to fetch http://storage.googleapis.com/bazel-apt/dists/stable/InRelease  The following signatures were invalid: KEYEXPIRED 1527185977  KEYEXPIRED 1527185977  KEYEXPIRED 1527185977
W: Some index files failed to download. They have been ignored, or old ones used instead.

해결법

새로운 gpg 키를 추가하고 업데이트 하자

$ curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
$ sudo apt-get update