Skip to content

Submodule init failing due to "SSL certificate problem"

Summary

I'm trying to build my Go code with help from the golang:1.7 image, I have vendored some golang packages as submodules, but when the runner try to init them, it get "SSL certificate problem".

Running the same image locally and doing: git clone .. and git submodule init it init the submodule without any issues, so is Gitlab somehow messing around with the certificates maybe?

Steps to reproduce

Add some submodules which use https and use the golang:1.7 image.

Actual behavior

Updating/initializing submodules...
Submodule 'vendor/github.com/minio/minio-go' (http://github.com/minio/minio-go) registered for path 'vendor/github.com/minio/minio-go'
Submodule 'vendor/github.com/nfnt/resize' (http://github.com/nfnt/resize) registered for path 'vendor/github.com/nfnt/resize'
Cloning into '/builds/ScreenPublisher/screengrab/vendor/github.com/minio/minio-go'...
fatal: unable to access 'https://github.com/minio/minio-go/': SSL certificate problem: unable to get local issuer certificate
fatal: clone of 'http://github.com/minio/minio-go' into submodule path '/builds/ScreenPublisher/screengrab/vendor/github.com/minio/minio-go' failed

Expected behavior

Submodule should init without any problems.

Relevant logs and/or screenshots

.gitlab-ci.yml

stages:
  - build
  - docker

build:
  image: golang:1.7
  stage: build
  variables:
    GIT_SUBMODULE_STRATEGY: normal
  script:
    - go-wrapper download
    - go build

Environment description

I'm using Gitlab.com shared runners

Used GitLab Runner version

Running with gitlab-ci-multi-runner 1.10.4 (b32125f)
Using Docker executor with image golang:1.7