Hi I am running gitlab-runner on arch 11.7.0 (8bb608ff).
I setup a gitlab-runner with the following commands:
sudo gitlab-runner install --user=gitlab-runner --working-directory=/…/gitlab-runner-home
sudo gitlab-runner register and start
When the pipeline is triggered I get the following error:
Running with gitlab-runner 11.7.0 (8bb608ff)
on my_builder
Using Shell executor…
Running on my_host…
mkdir: cannot create directory ‘/home/serj’: Permission denied
mkdir: cannot create directory ‘/home/serj’: Permission denied
ERROR: Job failed: exit status 1
So its trying to run in my personal user’s home directory for some reason
I setup “/…/gitlab-runner-home” to be the gitlab-runner user’s home directory and setup bash as login but it didn’t change anything.
Hey Sergio,
I was able to do some testing on my end with a similar configuration and this is working as intended. Can you forward over the content of your /etc/gitlab-runner/config.toml
file? Be sure to scrub out any sensitive information, like the token. This file will provide some info about the runner’s configuration and help narrow down what could be the issue.
If you’d like to do some investigating on your end you could set the log level for the runner to ‘debug’ and re-attempt the job. Here is the specific section you should reference in the runner documentation that will detail log level settings, which are defined in the config.toml file: Configuring GitLab Runner - Advanced Configuration. The logs should be written to your system syslog.
HI Caleb thanks for the reply.
I did a ps aux and the process was running with the wrong working directory. I honestly don’t want to reinstall it until I have to but I believe you can’t use “=” in the command line arguments atleast that’s the only thing I think a did different, could be wrong.
Looking at the config file like you asked it contains past runners although I uninstalled them.
“”"concurrent = 4
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = “Yocto fw builder”
url = “https://gitlab.com/”
token = “_____________________”
executor = “shell”
shell = “bash”
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[[runners]]
name = “yocto fw builder”
url = “https://gitlab.com/”
token = “_____________________”
executor = “shell”
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[[runners]]
name = “yocto fw builder”
url = “https://gitlab.com/”
token = “_____________________”
executor = “shell”
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[[runners]]
name = “yocto fw builder”
url = “https://gitlab.com/”
token = “_____________________”
executor = “shell”
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
“”"