I have a repo: https://github.com/Elydasian/gatling-example
I have a pipeline in jenkins ready, that checks out that repo, and after some building and whatnot, I want to tag the branch.
I made a "SSH Username with private key" credentials and added it to my jenkins pipeline Now, I am finished doing what I needed with it (I checkout the project)
Now I need to be able to TAG it. For that, I have done the following lines:
git tag TAG_NAME
git remote set-url --push origin git@github.com:Elydasian/gatling-example.git
git push origin TAG_NAME
Then, it throws an error:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Can you help me?