i am trying to set up an oracle cloud ubuntu vm as a gitlab runner instance with a shell executor.
I am getting this error when i try to run a job on it:
Running with gitlab-runner 15.11.0 (xxx)
on bob_the_builder_aarch64_shell xxx, system ID: xxx
Preparing the "shell" executor 00:09
ERROR: Preparation failed: shell /usr/bin/bash not found
Will be retried in 3s ...
ERROR: Preparation failed: shell /usr/bin/bash not found
Will be retried in 3s ...
ERROR: Preparation failed: shell /usr/bin/bash not found
Will be retried in 3s ...
ERROR: Job failed (system failure): shell /usr/bin/bash not found
WARNING: Preparation failed: shell /usr/bin/bash not found
On the Ubuntu vm in tried to check the bash path and it seems to be correct:
$ which bash
/usr/bin/bash
Tried as well:
/bin/bash
I also tried sh:
$ which sh
/usr/bin/sh
But the same outcome..
Here is my config.toml:
concurrent = 1
check_interval = 0
shutdown_timeout = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "bob_the_builder_aarch64_shell"
url = "https://gitlab.com/"
id = xxx
token = "xxx"
token_obtained_at = 2023-05-08T01:17:42Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "shell"
shell = "/usr/bin/bash"
[runners.cache]
MaxUploadedArchiveSize = 0
I also tried running gitlab-runner with sudo and using the config file at /etc/gitlab-runner/config.toml
with the same settings..
What on earth am i doing wrong / missing here?
Thank you for your time in advance!
The shell
configuration key is expected to be just the shell name, e.g., bash
, not the path to the executable.
So change:
shell = "/usr/bin/bash"
to
shell = "bash"