Windows Runner can't clone repo due to Certificate Revocation problem

Summary

Gitlab CI runner on MS Windows (running on Windows 7 x64) cannot clone repo due to SSL problem (certificate revocation checking).

This is a problem in small / testing environments where Certificate Revocation List infrastructure is not / cannot be set up.

Need to be able to pass the "CURLSSLOPT_NO_REVOKE" option to disable CRL checking with WinSSL (see: https://curl.haxx.se/libcurl/c/CURLOPT_SSL_OPTIONS.html).

Steps to reproduce

  1. Have environment where SSL is in use, but there are no entries in the AIA / CDP / OSCP sections of the certificate (e.g no Certificate Revocation List infrastructure exists)

  2. Undertake any action that triggers a build using the windows runner, e.g. pushing to a branch with a pipeline or clicking "retry" on a failed build in Gitlab web UI

Actual behavior

Build fails to check out repository, apparently due to being unable to check certificate revocation. Attempted workarounds e.g. specifying tls-ca-file or setting tls-skip-verify to true do not work.

Failure is due to schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) error, see logs section for more.

Expected behavior

Build checking out and building successfully, or at least progressing beyond checkout stage.

Relevant logs and/or screenshots

Running with gitlab-ci-multi-runner 1.11.2 (0489844)
  on HOSTNAME (a7e25147)
Using Shell executor...
Running on HOSTNAME...
Cloning repository...
Cloning into 'C:/gitlabrunner/builds/a7e25147/0/USERNAME/PROJECTNAME'...
fatal: unable to access 'https://gitlab-ci-token:xxxxxx@GITLABHOST/USERNAME/PROJECTNAME.git/': schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
ERROR: Job failed: exit status 128

Environment description

GitLab Community Edition 8.9.0-pre

Runner running on Windows 7 x64 as workstation admin

Used GitLab Runner version

c:\gitlabrunner>gitlab-runner.exe -v
Version:      1.11.2
Git revision: 0489844
Git branch:   1-11-stable
GO version:   go1.7.5
Built:        Tue, 04 Apr 2017 18:33:28 +0000
OS/Arch:      windows/amd64
Edited by 🤖 GitLab Bot 🤖