为什么我的 Gitlab runner 没有被检测到?此作业被卡住,因为您没有任何活跃的在线跑步者

Why is my Gitlab runner not detected? This job is stuck because you don't have any active runners online

我注册了Gitlab runner

我的工作在 Gitlab 中待处理 CI

This job is stuck because you don't have any active runners online or available with any of these tags assigned to them: fluffa-docker

我的gitlab-ci.yml

stages:
  - build
  - deploy-stage

build:
  stage: build
  tags:
    - fluffa-docker

这是我的标签

  image: docker:20-git
  services:
    - docker:20-dind
  script:
    - apk update && apk add jq
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker build -t $CI_REGISTRY_IMAGE:$VERSION -t $CI_REGISTRY_IMAGE:latest .
    - docker push $CI_REGISTRY_IMAGE:$VERSION
    - docker push $CI_REGISTRY_IMAGE:latest

deploy-stage:
  stage: deploy-stage
  image: alpine:latest
  script:
    - chmod og= $STAGE_ID_RSA
    - apk update && apk add openssh-client
    - ssh -i $STAGE_ID_RSA -o StrictHostKeyChecking=no $STAGE_SERVER_USER@$STAGE_SERVER_IP "docker stop $CI_PROJECT_NAME || true"
    - ssh -i $STAGE_ID_RSA -o StrictHostKeyChecking=no $STAGE_SERVER_USER@$STAGE_SERVER_IP "docker rm $CI_PROJECT_NAME || true"
    - ssh -i $STAGE_ID_RSA -o StrictHostKeyChecking=no $STAGE_SERVER_USER@$STAGE_SERVER_IP "docker image rm $CI_REGISTRY_IMAGE:latest || true"
    - ssh -i $STAGE_ID_RSA -o StrictHostKeyChecking=no $STAGE_SERVER_USER@$STAGE_SERVER_IP "docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY"
    - ssh -i $STAGE_ID_RSA -o StrictHostKeyChecking=no $STAGE_SERVER_USER@$STAGE_SERVER_IP "docker pull $CI_REGISTRY_IMAGE:latest"
    - ssh -i $STAGE_ID_RSA -o StrictHostKeyChecking=no $STAGE_SERVER_USER@$STAGE_SERVER_IP "docker run -d --restart unless-stopped --name 

我无法理解它是如何找不到有效的 运行 Gitlab runner 的。 为什么我的跑步者没有被检测到?

你能检查跑步者是否没有被锁定和共享或特定分配给对象 repo/project?你通过 opening your repo> settings > CICD> Runners 检查这个。寻找您的跑步者并分享结果。 另一种检查您是否具有管理员权限的方法:管理区域 > 概述 > 跑步者。

如果锁定打开它 Admin Area > Overview > runners > select your runner 并取消选中 When a runner is locked, it cannot be assigned to other projects