Luca Rasconi
Luca Rasconi

Reputation: 1105

"Missing CI config file" message on run pipeline, but .gitlab-ci.yml exists

3 screenshots to explain the issue

When I run the pipeline I've an error... error message saying "Missing CI config file"

But the file exists

But the file exists

And it's good

enter image description here

Upvotes: 11

Views: 10002

Answers (4)

Vlad Nikiforov
Vlad Nikiforov

Reputation: 6975

Just found this by googling the same issue. The answers listed here didn't help, so I thought it's worth adding what was wrong in my case.

The culprit was the leading whitespace accidentally copy-pasted into the file name. That is, I had .gitlab-ci.yml instead of .gitlab-ci.yml.

During investigation I realized that there was an indication that something is wrong with the file name after all. It was the icon next to the file name, which corresponds to a regular YAML file, not a GitLab CI pipeline configuration:

enter image description here

This eventually helped looking into the right direction.

Upvotes: 0

Ben Hampson
Ben Hampson

Reputation: 23

In my case, I incorrectly assumed that glab would run a pipeline for the current branch.

I was running glab cli run on branch-1 which did have a .gitlab-ci.yml. But it was trying to run a pipeline for master, which didn't have a .gitlab-ci.yml.

glab cli run -b branch-1 fixed it for me.

Upvotes: 0

Cr4zyTun4
Cr4zyTun4

Reputation: 765

It happened to me also when I was specifying the .gitlab-ci.yml in a .yAml format, I am not exactly sure why this happens. I have tried to understand the difference between the two reading this question but it seems there should be no differences. I lost 30 min because of this, hope I can save someone else time.

Upvotes: 0

Renerick
Renerick

Reputation: 530

  1. GitLab shows this error message when trying to execute an empty .gitlab-ci.yml file
  2. Check your configured .gitlab-ci.yml file location (Settings > CI/CD > General Pipelines), make sure that it points to the correct place in the repository

Upvotes: 13

Related Questions