Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server certificate verification failed #155

Closed
thebaer opened this issue Apr 29, 2022 · 3 comments
Closed

Server certificate verification failed #155

thebaer opened this issue Apr 29, 2022 · 3 comments

Comments

@thebaer
Copy link

thebaer commented Apr 29, 2022

I'm having trouble using xgo to compile my project, WriteFreely. It only occurs when trying to pull dependencies from a git repository that uses a Let's Encrypt certificate. So based on the error message, I believe it's caused by the new Let's Encrypt root certificate changes from late last year, and the xgo Docker image not containing that.

Is there something I can do to work around this?

Steps to reproduce

Get the https://github.com/writefreely/writefreely repository. Checkout hotfix-0.13.2 branch.

Run this:

xgo --targets=linux/amd64 -go go-1.15.x -out writefreely ./cmd/writefreely

I get the following output:

Checking docker installation...
Client: Docker Engine - Community
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        e91ed57
 Built:             Mon Dec 13 11:45:33 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       459d0df
  Built:            Mon Dec 13 11:43:42 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Checking for required docker image techknowlogick/xgo:go-1.15.x... found.
Cross compiling github.com/writefreely/writefreely/cmd/writefreely...
Building locally github.com/writefreely/writefreely/cmd/writefreely...
Compiling for linux/amd64...
go: github.com/manifoldco/[email protected] requires
        gopkg.in/[email protected]: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/9241c28341fcedca6a799ab7a465dd6924dc5d94044cbfabb75778817250adfc: exit status 128:
        fatal: unable to access 'https://gopkg.in/check.v1/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
2022/04/29 14:56:38 Failed to cross compile package: exit status 1.
@techknowlogick
Copy link
Owner

Thanks for this report @thebaer, especially all these details. Yeah, as you mentioned it's due to letsencrypt root cert update sept 30, 2021. However as go1.15 is EOL it's not being built anymore.

What happens when you try go1.18?

@thebaer
Copy link
Author

thebaer commented May 13, 2022

I run into a previous bug mentioned here... Go 1.15 is the last version I could successfully build with.

@zeripath
Copy link
Collaborator

I think the go.mod issue should now be solved @thebaer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants