You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为GitLab Runner实例设置标签?

为GitLab Runner设置"osx"标签的方法

方法1:注册Runner时直接设置

在注册Runner的过程中,你可以通过命令行参数直接指定标签:

gitlab-runner register --tag-list "osx"

如果是交互式注册流程,当终端提示输入Tags for the runner (comma-separated):时,直接输入osx即可完成设置。

方法2:通过GitLab网页界面修改

  1. 打开你的GitLab项目/群组/实例,进入Settings -> CI/CD页面
  2. 在Runners区域找到你要设置的Runner,点击右侧的编辑按钮
  3. 在弹出的编辑窗口中,找到Tags输入框,输入osx
  4. 点击保存修改即可

方法3:修改Runner的配置文件

  1. 找到GitLab Runner的配置文件config.toml,默认路径通常是:
    • Linux:/etc/gitlab-runner/config.toml
    • macOS:~/.gitlab-runner/config.toml
    • Windows:C:\GitLab-Runner\config.toml
  2. 在对应的[[runners]]段落中添加或修改tags字段:
    [[runners]]
      name = "OSX Runner"
      url = "https://your-gitlab-instance.com/"
      token = "your-runner-token"
      executor = "shell"
      tags = ["osx"]
    
  3. 重启GitLab Runner服务使配置生效:
    # Linux/macOS
    sudo gitlab-runner restart
    # Windows(PowerShell)
    Restart-Service gitlab-runner
    

内容的提问来源于stack exchange,提问作者Mit94

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 13:20:00