App Engine deploy failing with "fatal: unable to access 'https://gopkg.in/yaml.v3/': server certificate verification failed."

Viewed 7167

Anyone else getting this issue when deploying Go/Other projects to the App Engine?

Deployment was working fine on Tuesday, Sept 28. I tried to deploy on Friday, Oct 1 (yesterday) and today, but I still got the same error. It's not a code-related error as the code hasn't changed since the last deployment.

From the log:

Step #2 - "build": go: gopkg.in/yaml.v3@v3.0.0-20200313102051-9f266ea9e77c: git fetch -f origin refs/heads/:refs/heads/ refs/tags/:refs/tags/ in /layers/google.go.gomod/gopath/pkg/mod/cache/vcs/5ea86ba1b933025fb7a7a539058d4acea777e0b3175c573a70130f7ea565323f: exit status 128: Step #2 - "build": fatal: unable to access 'https://gopkg.in/yaml.v3/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

If I'm reading this right, is there a missing certificate in the App Engine? But then, I'm not sure what certificate it needs since I never had to provide one before. Maybe if I delete the certificate file, App Engine will recreate it?

Any ideas?

4 Answers

Experienced the certificate error too.

Assuming you are using the official golang image, to fix the certificate issue, you need to update ca-certificates and libgnutls30 packages.

RUN apt update && apt install ca-certificates libgnutls30 -y

I had the same issue is Travis CI build.

I changed the build image to ubuntu 20.04 (from 16.04) and update package ca-certificates

sudo apt-get update
sudo apt-get install --reinstall ca-certificates

Solved ... mostly

This solution is for those running on App Engine Standard environment using Go 1.11

change your runtime in app.yaml to

runtime: go115

and change your go version in go.mod file:

module myapp

go 1.11

This will allow you to deploy your application. In my case, there were other changes I had to make to the app.yaml. For example, I had to add

app_engine_apis: true

I have my app deployed now but not completely running. I'll post relevant fixes here if I discover anything else. Hope this helps those that run into this issue.

To sum it all up -- it was an issue on the App Engine side. Other users experienced the same problem and the Google team resolved the issue.

For reference I've posted the issue here: https://issuetracker.google.com/issues/201753230

For my project, I reverted the "runtime: go115" changes to go111 (also removed app_engine_apis from app.yaml) and the application deployed as normal.

Related