I solved this myself.

   1. Use Credentials Binding Plugin to inject the git creds into two 
   environment variables - GIT_USER and GIT_PASSWORD
   2. Before the sbt build, use a shell build step to get the creds into a 
   git credential.helper store. E.g.:
   
   git config --local credential.helper 'store 
   --file=/tmp/jenkins/.gitcreds'
   git fetch https://$GIT_USER:$GIT_PASSWORD@[repo url]
   
(Note that the credentials are stored in plain text in the file you 
designate)

On Wednesday, May 20, 2015 at 9:17:04 AM UTC-4, mikelenner wrote:
>
> Hello - 
>
> I'm using the Credentials Plugin to manage jenkin's access to git. This 
> works fine and integrates well with the Jenkins Git Plugin.
>
> However, I'm running an sbt build that uses the sbt-release plugin to add 
> commits, tag, and push those changes to the origin repo. I have this setup 
> as an "Execute Shell" build step. My problem is getting the sbt build to 
> leverage the Credentials Plugin. 
>
> Feels like the right path is to use the Credentials Binding Plugin which 
> allows you to inject the credentials as environment variables. But, I 
> haven't been able to progress any further. Anyone already do this?
>
> Thanks,
> Mike
>

-- 
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/451239c6-1d11-420a-806f-1985dc71478c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to