I am trying to delete a branch using gitlab-ci.yml.
But it shows "you are not allowed to upload the script".
I am using the script as in the image. Is there anything else that we need to do to delete the script using pipeline?
Asked
Active
Viewed 1,096 times
-1

Kirk Broadhurst
- 27,836
- 16
- 104
- 169

Sachin Sukumaran
- 707
- 2
- 9
- 25
1 Answers
1
In order to push any changes to your repo while you are using the pipeline, you cannot use the "git push origin --delete command directly. You have to use a similar way of local branch delete (git branch -d ) and push your code.
Here is an example on how you can push the changes to GitLab repo from your pipeline - How do I push to a repo from within a gitlab CI pipeline?

John
- 22
- 3
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 09 '22 at 18:50
-
Yes Implemented in that way itself... We integrated it to a ec2 instance and did that – Sachin Sukumaran Mar 12 '22 at 16:39