Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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/[email protected]: 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?

like image 838
Daniel Pop Avatar asked Oct 02 '21 21:10

Daniel Pop


1 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
like image 106
Nathan Avatar answered Sep 22 '22 00:09

Nathan