.You're correct that the git push needs to be wrapped in some form of
credentials.

Git checkouts in Jenkins can be done to the branch name of your choice,
including "match the branch name".  Refer to the "Additional Behaviour"
called "Checkout to specific local branch".  The online help for that
option says that you can use "**" as the value and that will be interpreted
to use the branch name which was selected for checkout.  An example is
available in
https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-33827/Jenkinsfile .
The "pipeline syntax" for checkout will add that behavior for you as well
(though as Stephen notes, the UI is not pretty and shows you many things as
options which you should not use).

Sorry that is not the default, but preserving historical behavior has been
important for the many users of the plugin.

Mark Waite

On Sat, Jun 17, 2017 at 1:09 AM Idan Adar <[email protected]> wrote:

> I take it back, not good workaround for me after all...
>
> --
> 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/954f8f8f-9cc3-4085-ba95-d3a241dc8e8a%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/954f8f8f-9cc3-4085-ba95-d3a241dc8e8a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAO49JtFt9XQM9OTbk%2B-ZTWskbp9XZTfz%3D4V_xunhHsyAGGaoWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to