We haven't really figured both this Git issue yet, but another problem we
ran into when running builds in Docker containers is described in
https://go.cloudbees.com/docs/support-kb-articles/CloudBees-Jenkins-Enterprise/Why-am-I-unable-to-authenticate-via-sshagent-inside-docker-.html
where
the socket path is too long.
On Wednesday, November 30, 2016 at 5:20:22 AM UTC-6, Torsten Reinhard wrote:
>
> Hi all,
>
> I have a Multi Branch Project, using a *.git Repository. All branches are
> detected and the checkout is working.
> In my JenkinsFile I need to execute some "git" commands, like:
>
> ...
> sh "git tag -d FOR_INTEGRATION_TESTING" // removes
> the tag in local env.
> sh "git push origin :refs/tags/FOR_INTEGRATION_TESTING" // removes
> the tag in remote env.
> sh "git tag -a FOR_INTEGRATION_TESTING" // adds
> the tag to different commit
> sh "git push origin FOR_INTEGRATION_TESTING" // pushes the
> change to the remote
> ...
>
> How can I apply the credentials here ?
> When trying
>
> withCredentials [$class: 'UsernamePasswordMultiBinding', credentialsId:
> git_creds, usernameVariable: 'G_USER', passwordVariable: 'G_PASS'] {
> ...
> }
>
>
> I see this exception:
>
> org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException:
> Credentials 'a378e16a-3d20-4465-aef1-b2bd233f15b6' is of type 'SSH Username
> with private key'
> where
> 'com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials'
> was expected
>
>
> Is there another class instead of "UsernamePasswordMultiBinding" I have to
> use?
>
> Thanx for pointing me in the right direction,
>
> Torsten
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/50223fa8-6407-4d8b-8c21-028fc1b507a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.