I have a bat script that is run on my jenkins pipeline.
It is used to tag a specific commit of my branch, and push it back to git. Looks like this:
"scriptCommand": https://%C_USERNAME%:%C_PASSWORD%@bitbucket.psr.io/scme/ci/ci.git\ngit push origin TAG1\ngit remote set-url --push origin https://bitbucket..psr.io/scme/ci/ci.git"
That command is made using the variables C_USERNAME, C_PASSWORD and the TAG1 The first two are taken from a usernamePassword type jenkins credentials, and are injected into the string, the TAG1 is a stimple string that should be used to get my git branch tagged
And that works, when I use the http link instead of the SSH link for my repo
I need to be able to handle the SSH link as well. For that, I researched on SSH private key, and turns out that the jenkins credentials have a specific field for it: SSH Username with private key
I made one such credential in jenkins, using my private key, and username
But now I am having trouble on how to create a batch line that works the same as the one above with the http link.
Needless to say, I have 0 exp on this matter.
Can some help me on this? And thank you for your time.