CI Runner fails to clone, CI_SERVER_TLS_CA_FILE certificate File contains too many chars [ WINDOWS ]
Summary
GitLab CI runner cannot clone repository and fails during automated build processes.
Steps to reproduce
This problem can be reproduced if somehow the license text file CI_SERVER_TLS_CA_FILE should be greater than 8191 chars.
Example Project
< Skipping >
What is the current bug behavior?
license text file CI_SERVER_TLS_CA_FILE is not created if size is greater than 8191 chars.
What is the expected correct behavior?
license text file CI_SERVER_TLS_CA_FILE should be created irrespective of its size.
Results of GitLab environment info
I am trying to build using GitLab CI. During the clone step the runner fails
Cloning into 'C:/GitLab-Runner/builds/hash/0/myname/myproject'...
fatal: unable to access 'https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@<rep_url>t/': error setting certificate verify locations:
CAfile: C:/GitLab-Runner/builds/hash/0/myname/myproject.tmp\CI_SERVER_TLS_CA_FILE
CApath: none
The system cannot find the path specified.
During the initialization steps the runners tries to create the CI_SERVER_TLS_CA_FILE file using the echo "" method I can see this happening in debug logs
C:\GitLab-Runner>echo -----BEGIN CERTIFICATE-----!nl[[LOT OF STUFF]]>'C:/GitLab-Runner/builds/hash/0/myname/myproject.tmp\CI_SERVER_TLS_CA_FILE
Please note that the char length of the command above is greater than 8191.
This file is never created and hence the git clone fails in the later steps.
Results of GitLab application Check
GitLab Enterprise Edition 10.1.4-ee gitlab-ee@a51205490893fb6e076deef78b7a4507ad747e8d
Possible fixes
-Please suggest some workaround to this problem.
-Please generate the text license file CI_SERVER_TLS_CA_FILE by some mechanism where the windows limitation can be avoided.