Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • I have encountered a problem with this - the git config global persists on next jobs on my runner. It completely breaks the CI. Have you had this problem? I can not clone any resources from my gitlab because the CI_JOB_TOKEN is stale. Commented Sep 17, 2018 at 19:24
  • @Darkowic I use the Docker runner so I haven't encountered that problem. Commented Sep 18, 2018 at 13:19
  • 1
    Me too. Though I solved it today :) Its because of npm... By default npm install modifies package-lock.json. When you set in your CI to only fetch changes instead of cloning, this modified packge-lock.json file persists between jobs and npm cannot install anything... Commented Sep 18, 2018 at 13:28
  • 2
    This solution is the most elegant. It works with dockerized GitLab Community Edition 11.6.4 Commented Jan 18, 2019 at 17:40
  • You can also omit the group and repo to use the job token for all repos on the gitlab instance. See gist.github.com/Kovrinic/ea5e7123ab5c97d451804ea222ecd78a Commented Mar 1, 2021 at 0:06