incorrect git config http.https.sslCAInfo being set when using git fetch using Debian Stretch
Summary
gitlab runner with ssh executor on a Debian Stretch.
- during the clone stage, the git config http.https.sslCAInfo is set to a valid path that contains the certificate
- during the fetch stage, the git config http.https.sslCAInfo is set to an invalid path. Instead of /builds/xxx/0/repository.tmp/CI_SERVER_TLS_CA_FILE, it points to /builds/xxx/0/repository/builds/xxx/0/repository.tmp/CI_SERVER_TLS_CA_FILE.
As a side note, on a Centos 7.2 (git 1.8, curl 7.29), when an invalid path is provided, it reverts to system-wide certificate files, and it doesn't fail.
Actual behavior
the git config http.https.sslCAInfo is set to an invalid path
Expected behavior
Consistent path location.
Relevant logs and/or screenshots
Environment description
OS: Debian Stretch
Used GitLab Runner version
11.1.0
Similar to #3179