1

I was trying to tag a git branch using Gitlab CI. With the help of this answer from this community,

How to tag source code using gitlabCI

I can successfully tag a git branch from Gitlab CI pipeline. But In that method, I noticed that we need to provide the gitlab credentials in that pipeline code. I know, we can pass that as Gitlab environment variables.

But I just need to know, is there any other method to do this operation? With a Key or Token or something rather than direct username and password?

Not sure whether my question legit? I was thinking about the security side of it.

1 Answer 1

2

I believe that what you need is just a Personal Access Token, or if you're a maintainer, possibly a Deploy Token. It's much safer than embedding user credentials.

1
  • 1
    Personal Access token worked for me, thanks. As Deploy tokens don't provide write_repository scope, that didn't worked. I'm explaining the steps here: medium.com/@neronjoseph.sep/… Commented Oct 3, 2020 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.