Get error when install google-chrome-stable -> W: GPG error: http://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78BD65473CB3BD13

my config which is cloned from angualr.io as blew:

dist: xenial
sudo: false

language: node_js
node_js:
  - "8"

addons:
  apt:
    sources:
      - google-chrome
    packages:
      - google-chrome-stable

cache:
  directories:
    - ./node_modules

install:
  - npm install

before_script:
  - chmod +x travis.sh
  - sh travis.sh

script:
  - npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI

But I get the error:

Worker information

60.13s0.01s0.00s0.01s

system_info

7Build system information

159

1600.00s0.37s0.19s0.05s0.00s0.04s0.00s0.01s0.01s0.01s0.01s0.01s0.00s0.00s0.02s0.00s0.01s0.28s0.00s0.00s0.00s0.01s0.00s0.09s0.01s0.75s0.00s0.00s6.03s0.00s2.23s0.00s2.12s

docker_mtu

resolvconf

161Adding APT Sources

1620.38s$ curl -sSL "https://build.travis-ci.com/files/gpg/google-chrome.asc" | sudo -E apt-key add -

163OK

1640.01s$ echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list >/dev/null

1658.43s$ travis_apt_get_update

166Installing APT Packages

1670.50s$ sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install google-chrome-stable

168Reading package lists...

169Building dependency tree...

170Reading state information...

171Recommended packages:

172 libu2f-udev

173The following packages will be upgraded:

174 google-chrome-stable

1751 upgraded, 0 newly installed, 0 to remove and 259 not upgraded.

176Need to get 62.2 MB of archives.

177After this operation, 16.6 MB of additional disk space will be used.

178WARNING: The following packages cannot be authenticated!

179 google-chrome-stable

180E: There were unauthenticated packages and -y was used without --allow-unauthenticated

apt-get.diagnostics

181apt-get install failed

182$ cat ${TRAVIS_HOME}/apt-get-update.log

183Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]

184Get:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease [56.4 kB]

185Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]

186Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]

187Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease

188Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]

189Get:7 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 Packages [235 kB]

190Get:8 http://dl.google.com/linux/chrome/deb stable Release [943 B]

191Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main Sources [1,103 kB]

192Get:10 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main i386 Packages [234 kB]

193Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/restricted Sources [5,179 B]

194Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe Sources [9,802 kB]

195Get:13 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]

196Ign:13 http://dl.google.com/linux/chrome/deb stable Release.gpg

197Get:14 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,106 B]

198Get:15 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/multiverse Sources [215 kB]

199Get:16 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,558 kB]

200Get:17 http://security.ubuntu.com/ubuntu xenial-security/main Sources [198 kB]

201Get:18 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main i386 Packages [1,552 kB]

202Get:19 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main Translation-en [799 kB]

203Get:20 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]

204Get:21 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/restricted i386 Packages [14.5 kB]

205Get:22 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/restricted Translation-en [3,019 B]

206Get:23 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,243 B]

207Get:24 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9,827 kB]

208Get:25 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [142 kB]

209Get:26 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [3,520 B]

210Get:27 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe i386 Packages [9,804 kB]

211Get:28 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1,031 kB]

212Get:29 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/universe Translation-en [6,256 kB]

213Get:30 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]

214Get:31 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [799 kB]

215Get:32 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages [172 kB]

216Get:33 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [131 kB]

217Get:34 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Sources [435 kB]

218Get:35 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2,696 B]

219Get:36 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [438 kB]

220Get:37 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [333 kB]

221Get:38 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [9,423 B]

222Get:39 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1,408 kB]

223Get:40 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]

224Get:41 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [1,151 kB]

225Get:42 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [596 kB]

226Get:43 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [12.7 kB]

227Get:44 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]

228Get:45 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted i386 Packages [13.1 kB]

229Get:46 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2,204 B]

230Get:47 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,337 B]

231Get:48 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1,008 kB]

232Get:49 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [914 kB]

233Get:50 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [605 kB]

234Get:51 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [447 kB]

235Get:52 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [19.3 kB]

236Get:53 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [521 kB]

237Get:54 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages [18.1 kB]

238Get:55 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [9,022 B]

239Get:56 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/main Sources [5,073 B]

240Get:57 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Sources [7,665 B]

241Get:58 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [262 kB]

242Get:59 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7,942 B]

243Get:60 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/main i386 Packages [7,942 B]

244Get:61 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4,571 B]

245Get:62 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8,807 B]

246Get:63 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6,282 B]

247Get:64 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [8,450 B]

248Get:65 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4,428 B]

249Get:66 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages [6,456 B]

250Get:67 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [2,735 B]

251Fetched 53.0 MB in 3s (13.5 MB/s)

252Reading package lists...

253W: GPG error: http://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78BD65473CB3BD13

254W: The repository 'http://dl.google.com/linux/chrome/deb stable Release' is not signed.

255The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install google-chrome-stable" failed and exited with 100 during .

256

257Your build has been stopped.

what’s wrong with me, help.

Hey @teacherpan,

Try the following in the config file:

  sources:
      - google-chrome	    
  packages:	
      - dpkg  
      - google-chrome-stable

We have a Chrome addon to handle this, I believe. See

Should remove the safelist entry then