I have followed the trouble shooting to wit’s end.
I have a self-hosted Gitlab EE instance on
gitlab.mysite.com and I have a site located at an IP address like
I ssh’d into the site which is an IP (no domain yet) and installed my Laravel app. Now I have changed I want to autodeploy, so I while I am in tn the box of the Laravel project, I install the gitlab-runner
myuser@laravel-app-01:/var/www/html$ gitlab-runner -v Version: 10.4.0 Git revision: 857480b6 Git branch: 10-4-stable GO version: go1.8.5 Built: Mon, 22 Jan 2018 09:47:33 +0000 OS/Arch: linux/amd64
It’s on Ubuntu/Nginx.
Here is my
concurrent = 1
check_interval = 0
name = “Dashboards”
url = “https://gitlab.mysite.com/”
token = “"
executor = “ssh”
user = “myuser”
password = "*”
host = “10.79.78.53”
port = “22”
identity_file = “/home/myuser/.ssh/id_rsa”
Obfuscated for reasons. I copy the
token above from
https://gitlab.mysite.com/web/dashboards/settings/ci_cd where it says
Shared runners and gives you the URL and token.
So I do the following
gitlab-runner checks like so:
myuser@laravel-app-01:/var/www/html$ gitlab-runner list Listing configured runners ConfigFile=/home/myuser/.gitlab-runner/config.toml Dashboards Executor=ssh Token=******** URL=https://gitlab.mysite.com/ myuser@laravel-app-01:/var/www/html$ gitlab-runner verify WARNING: Running in user-mode. WARNING: The user-mode requires you to manually start builds processing: WARNING: $ gitlab-runner run WARNING: Use sudo for system-mode: WARNING: $ sudo gitlab-runner... Verifying runner... is alive runner=********
Awesome, everything seems to be working. The runner is verified and installed, so I go to the main admin page:
Great. All good. So I go to double check:
Good deal. All set. I have my
before_script: - '[[ ! -e /.dockerenv ]] && exit 0' stages: - deploy_master deploy_master: stage: deploy_master before_script: - mkdir -p ~/.ssh - echo -e "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: - ssh $DEV_USER@$DEV_SERVER "cd ~/var/www/html && git pull origin master && ~/bin/composer install" environment: name: Testing url: http://10.79.78.53 only: - master
All I am trying to do is build and deploy. Then once I get it working… tests. But this is simple stuff for a Laravel app, right?
and yes, I have my SSH keys and I did upload them to the Laravel project app server where the gitlab runner is also hosted. I don’t think my
.gitlab-ci.yml is to blame because appearantly the job won’t even run.
When I go to
Pipeline: I get:
This job is stuck, because you don't have any active runners that can run this job. Go to Runners page
I go there and … well… it’s active, no?
So I am at my wit’s end. What am I doing wrong? I would love to solve this.
Thank you for your time.