Can the CI_JOB_TOKEN with GitLab be used to push to the repo and create a tag?

Viewed 541

I want to push to a GitLab repo with the automatically provided CI_JOB_TOKEN. Is this currently permitted or do I have to create a tag explicitly?

1 Answers

You can use deploy token. Then in your script use that access token as follows.

git push http://$CI_USER:$CI_ACCESS_TOKEN@$GIT_REMOTE.git $BRANCH_NAME

Related