Hi everyone,
I am trying to use pre-commit directly on a gitlab server (not mine but self-hosted) using this tutorial
https://stackoverflow.com/collectives/articles/71270196/how-to-use-pre-commit-to-automatically-correct-commits-and-merge-requests-with-g
However when I want to merge I get the following error : You are not allowed to push code to this project.
I really don't know where the problem is since I have created the project access token with write_repository
#I can't push in a branch from a CI job
8 messages · Page 1 of 1 (latest)
Looking at the CI template that is linked in the stackoverflow post, did you set a PRE_COMMIT_ACCESS_TOKEN variable in your project?
Yes
That are not variables. That are the project access tokens.
You also need to set a CI/CD Variable with the name PRE_COMMIT_ACCESS_TOKEN to the value of the token that you created
I did this too
Oh wait, you created the token with the Guest role. In order to push into the repository, you need to have at least Developer role