I want to automate building and deploying of projects. In this regard, I want to use GItlab API to retry particular jobs in Gitlab Pipeline.
The API call I make as follows:
curl --request POST --header "PRIVATE-TOKEN: xxx" "https://gitlab.example.com/api/v4/projects/1/jobs/1/retry"
My Job otherwise can be triggered manually and my gitlab-ci.yml file looks like this:
execute_octoDeploy:
tags:
- windows
stage: build
when: manual
script:
- .\BuildScripts\octodeploy.ps1
I get 403 error, which according to https://docs.gitlab.com/ee/api/README.html means that I am not authorized. Whereas I have all the rights of the project and I am the owner of the same.
To add: I can trigger other non-manual jobs but not this. I also referred: https://gitlab.com/gitlab-org/gitlab-ce/issues/22824
What might be wrong? How can I solve this?