Unknown option "-l", ERROR: Job failed: prepare environment: exit status 1 when using sh on windows server
Summary
I'm getting a "ERROR: Job failed: prepare environment" when trying to initiate an sh job run in windows server
Steps to reproduce
Have a pipeline run that returns "Hello World"
.gitlab-ci.yml
stages:
- build
Full run:
tags:
- AUTORUNNER
stage: build
script:
- echo "Hello World"
Actual behavior
Getting the an error after job is initiated
Expected behavior
A successful pipeline job with Hello World
Relevant logs and/or screenshots
job log
Preparing the "shell" executor
Using Shell executor...
Preparing environment
Unknown option "-l"
Usage: sh [-XT] [-c cmd] [-o option] [-abCefhGHikLmnprstuvwx] arg ...
ERROR: Job failed: prepare environment: exit status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
Environment description
My GitLab runner is installed on a windows server machine located on premises.
GitLab Runner version: 15.8.1
Windows Server Details: Microsoft Windows Server 2012 Standard
config.toml contents
concurrent = 1
check_interval = 0
shutdown_timeout = 0
[session_server]
session_timeout = 1800
c[[runners]]
name = "GitlabRunner"
url = "https://***.***.com/"
id = 11
token = "************"
executor = "shell"
shell = "sh"
Used GitLab Runner version
Installed with a service account credentials on the windows server
Version: 15.8.1
Git revision: f86890c6
Git branch: 15-8-stable
GO version: go1.18.9
Built: 2023-02-02T14:37:29+0000
OS/Arch: windows/amd64
Edited by Lucas W