- Installing
- macOS troubleshooting
GitLab Runner can be installed and updated on macOS.
Osx Curl Example
Installing
There are two methods for installing GitLab Runner on macOS:
$ sudo apt-get install autoconf automake curl flex g gcc gdb git krb5-admin-server krb5-kdc krb5-user libkrb5-dev libsasl2-dev libsasl2-modules libsasl2-modules-gssapi-mit libssl-dev libtool lsb-release make ntp openjdk-8-jdk openssl patch pkg-config python rsync unzip vim-common. Doing it Right¶. Let’s install a real version of Python. Before installing Python, you’ll need to install GCC. GCC can be obtained by downloading Xcode, the smaller Command Line Tools (must have an Apple account) or the even smaller OSX-GCC-Installer package.
- Manual installation. This method is officially supported and recommended by GitLab.
- Homebrew installation. Install with Homebrew as an alternative to manual installation.
Manual installation (official)
Download the binary for your system:
You can download a binary for every available version as described inBleeding Edge - download any other tagged release.
Give it permissions to execute:
The rest of the commands should execute as the user who will run the runners.
- When you build iOS or macOS applications on macOS, use the shell executor.The build and tests run as the identity of the logged-in user, directly on the build host.It does not run in a container. This is less secure than using container executors. For more information, see thesecurity implications documentationfor additional detail on what to keep in mind in this scenario.
Install GitLab Runner as a service and start it:
GitLab Runner is installed and will be run after a system reboot.
Homebrew installation (alternative)
A Homebrew formula is available to install GitLab.
To install GitLab Runner using Homebrew:
Install GitLab Runner.
Install GitLab Runner as a service and start it.
GitLab Runner is installed and running.
Limitations on macOS
Currently, the only proven way for it to work in macOS is by running the service in user-mode.
Since the service will be running only when the user is logged in, you shouldenable auto-login on your macOS machine.
The service will be launched as a LaunchAgent
. By using LaunchAgents
,the builds will be able to perform UI interactions, making it possible to run andtest in the iOS simulator.
It’s worth noting that macOS also has LaunchDaemons
, services runningcompletely in background. LaunchDaemons
are run on system startup, but theydon’t have the same access to UI interactions as LaunchAgents
. You can try torun the Runner’s service as a LaunchDaemon
, but this mode of operation is notcurrently supported.
You can verify that GitLab Runner created the service configuration file afterexecuting the install
command, by checking the~/Library/LaunchAgents/gitlab-runner.plist
file.
If Homebrew was used to install git
, it may have added a /usr/local/etc/gitconfig
filecontaining:
This tells Git to cache user credentials in the keychain, which may not be what you wantand can cause fetches to hang. You can remove the line from the system gitconfig
with:
Alternatively, you can just disable credential.helper
for the GitLab user:
You can check the status of the credential.helper
with:
Manual update
Stop the service:
Download the binary to replace the GitLab Runner executable:
You can download a binary for every available version as described inBleeding Edge - download any other tagged release.
Give it permissions to execute:
Start the service:
Make sure that you read the FAQ section which describessome of the most common problems with GitLab Runner.
Upgrade the service file
In order to upgrade the LaunchAgent
configuration, you need to uninstall andinstall the service:
Using codesign with the GitLab Runner Service
If you installed gitlab-runner
on macOS with homebrew and your build callscodesign
, you may need to set <key>SessionCreate</key><true/>
to haveaccess to the user keychains. In the following example we run the builds as the gitlab
user and want access to the signing certificates installed by that user for codesigning:
macOS troubleshooting
The following relate to troubleshooting on macOS.
'launchctl' failed: exit status 112, Could not find domain for
This message may occur when you try to install GitLab Runner on macOS. Make surethat you manage GitLab Runner service from the GUI Terminal application, notthe SSH connection.
Failed to authorize rights (0x1) with status: -60007.
If GitLab Runner is stuck on the above message when using macOS, there are twocauses to why this happens:
Osx Curl Certificates
Make sure that your user can perform UI interactions:
The first command enables access to developer tools for your user.The second command allows the user who is member of the developer group todo UI interactions, e.g., run the iOS simulator.
Make sure that your GitLab Runner service doesn’t use
SessionCreate = true
.Previously, when running GitLab Runner as a service, we were creatingLaunchAgents
withSessionCreate
. At that point (Mavericks), this wasthe only solution to make Code Signing work. That changed recently withOS X El Capitan which introduced a lot of new security features thataltered this behavior.Since GitLab Runner 1.1, when creating aLaunchAgent
, we don’t setSessionCreate
. However, in order to upgrade, you need to manuallyreinstall theLaunchAgent
script:Then you can verify that
~/Library/LaunchAgents/gitlab-runner.plist
hasSessionCreate
set tofalse
.
fatal: unable to access 'https://path:3000/user/repo.git/': Failed to connect to path port 3000: Operation timed out
error in the job
If one of the jobs fails with this error, make sure the runner can connect to your GitLab instance. The connection could be blocked by things like:
- firewalls
- proxies
- permissions
- routing configurations
Help & feedback
Docs
Edit this pageto fix an error or add an improvement in a merge request.Create an issueto suggest an improvement to this page.
Show and post commentsto review and give feedback about this page.
Product
Create an issueif there's something you don't like about this feature.Propose functionalityby submitting a feature request.
Join First Lookto help shape new features.
Feature availability and product trials
View pricingto see all GitLab tiers and features, or to upgrade.Try GitLab for freewith access to all features for 30 days.
Get Help
If you didn't find what you were looking for,search the docs.
If you want help with something specific and could use community support,post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLabsubscription).
We're a small charity, repurposing laptops to support kids' education over the COVID pandemic. We've been using Ubuntu for our coding club laptops since we started 5yrs ago.
We've repurposed nearly 700 laptops but it's a bit of a faff. First we use DBAN, then install Ubuntu, then run a configuration digi_auto.sh script. I'd like to get to a single usb install for a desktop image.
I've got a (nearly) working cloud-init but while it runs the digi_auto.sh file (I know this because part of the script registers on rudder.io for update management), when I log in after the install, it's like the config script never happened. I'm assuming it's running on the usb image in memory which is obviously lost when the usb comes out and I boot from hdd.
The .sh file is basically a cut'n'paste from the one we use at the moment from terminal.
The reason I'm doing it this way, is that I have a working .sh install script that I'd like to keep and I don't really want to spend the time trying to get everything into a cloud-init user-data file.
I'm building the iso from the builder script on github: https://github.com/covertsh/ubuntu-a...tall-generator
What I'd like is a simple usb that I can hand out to volunteers to do everything in one hit. I've taken out the early_command for shred to speed up testing. It 'runs' without errors, but doesn't do what I think it should do. I've tried putting the curl part in ' ' but then it throws a non-zero 127 error.
Are there any 'obvious' gotcha's in my files, and how do I get the install to run on the laptop image?
This is my user-data file
and this is the digi_auto.sh file that it should run on /target