Gitlab-ci error: Job failed: prepare environment: exit status 1 - Stack Overflow

admin2025-04-16  3

I'm new to GitLab CI and trying to run my first pipeline on an Ubuntu 22.04 server, but I'm encountering an error. Here is the error description image

Here is my .gitlab-ci.yml file:

stages:
    - build
    - deploy
    - checklog

build:
    stage: build
    script:
        - whoami
        - pwd
        - ls -l
    tags:
        - gitlab-server

I'm new to GitLab CI and trying to run my first pipeline on an Ubuntu 22.04 server, but I'm encountering an error. Here is the error description image

Here is my .gitlab-ci.yml file:

stages:
    - build
    - deploy
    - checklog

build:
    stage: build
    script:
        - whoami
        - pwd
        - ls -l
    tags:
        - gitlab-server
Share Improve this question edited Feb 3 at 19:51 Nhật Vũ Quang asked Feb 3 at 19:49 Nhật Vũ QuangNhật Vũ Quang 32 bronze badges
Add a comment  | 

1 Answer 1

Reset to default -1

This is my Gitlab CI that work perfectly fine, Like this you can ad more stages into it.

stages:
  - jobs

my_job:   
  stage: jobs   
  script:
    - echo "Add commands accordingly"
    - echo "Manual job started"
    - echo "Manual job finished"   
  only:
    - main
转载请注明原文地址:http://www.anycun.com/QandA/1744753038a87121.html