CI_SERVER_TLS_CA_FILE generated incorrectly when used on Windows/Powershell executor
Summary
CI_SERVER_TLS_CA_FILE
generated incorrectly when used on Windows/Powershell
Steps to reproduce
git config: http.sslBackend = openssl
config.toml: [runners] tls-ca-file = "tls-ca-file.pem"
Actual behavior
fatal: unable to access 'https://xxxxx/xxx.git/': SSL certificate problem: unable to get issuer certificate
Expected behavior
cert. ok
Environment description
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.17134.858
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.858
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Used GitLab Runner version
.\gitlab-runner.exe --version
Version: 12.4.0
Git revision: 1564076b
Git branch: 12-4-stable
GO version: go1.10.8
Built: 2019-10-21T14:37:13+0000
OS/Arch: windows/amd64
Possible fixes
CI_SERVER_TLS_CA_FILE generated in UTF-8 Encoding with BOM, so
- $CI_SERVER_TLS_CA_FILE | Out-File "C:\GitLab-Runner\builds\0\project-1.tmp\CI_SERVER_TLS_CA_FILE"
+ $CI_SERVER_TLS_CA_FILE | Out-File "C:\GitLab-Runner\builds\0\project-1.tmp\CI_SERVER_TLS_CA_FILE" -Encoding ascii