3

When I merge to master I have a GitLab CI/CD pipeline which as part of the deployment process runs npm version patch to up the version of my npm package in package.json

However I get the following output when I try to push the result of the tag applied by npm version patch. So the npm version command has worked correctly, I just can't get it to push into the master branch.

What do I need to do to get the pipeline script to push the result of the tag applied by npm version to master ?

$ npm version patch
 v0.4.3
$ git push origin master:master
error: src refspec master does not match any.
error: failed to push some refs to 'https://gitlab-ci-token:[MASKED]@gitlab.com/myrepo-name/group/project-name/company-project-name.git'
ERROR: Job failed: exit code 1

Simon Long
  • 1,310
  • 4
  • 20
  • 39
  • 1
    It seems you missed a step before running `git push origin master:master`. Please check [Message 'src refspec master does not match any' when pushing commits in Git](https://stackoverflow.com/questions/4181861/message-src-refspec-master-does-not-match-any-when-pushing-commits-in-git) and [error: src refspec master does not match any](https://stackoverflow.com/questions/21264738/error-src-refspec-master-does-not-match-any/42598606) which both are about `error: src refspec master does not match any.` – Amir Dadkhah Feb 26 '20 at 14:21
  • 1
    This discussion might be relevant: https://gitlab.com/gitlab-org/gitlab/issues/14101#note_261684708 – Nathan Friend Feb 26 '20 at 16:11

0 Answers0