GitLab pipeline fails frequently even after trying in many ways

Viewed 1783

I was just trying to work with GitLab CI/CD. I created a test angular project which had only one component, and worked fine. Then I started the GitLab Runner in that project. Added a .yml file to run the project. But the pipeline failed all the time. Then for testing purpose, I removed all the scripts for running the project, and just added some echo statements. Even then my pipeline failed. It is showing that

& : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Screenshot of yml script

enter image description here

Error message showed in GitLab

enter image description here

3 Answers

I uninstalled my git and reinstalled it. The location I provided for environment path was different, than the one in which the git was actually installed at. Hence, when I reinstalled it, it got automatically installed into my C drive(this was the environment path I had set, I got this path while I was searching for solutions in net). I had not cross checked, whether actually my git location was C or not. I thought it might have been saved in C itself, but it was actually saved in some other location.

After installing the git from git-scm.com you must restart the gitlab-runner service.

I had problem in windows server and eventually become fixed :)

# gitlab-runner stop
# gitlab-runner start
Related