If doing it from within Pipeline and using an ssh connection to the remote repository, you can use the instructions at:
https://stackoverflow.com/questions/44377238/use-ssh-credentials-in-jenkins-pipeline-with-ssh-scp-or-sftp#_=_ If you're using a Freestyle project, there is a "Git Publisher" provided by the git plugin that can allow you to push changes to the repository. You may also find that pushing changes to the remote repository from a Jenkins job is more complicated than you want. Jenkins generally watches a repository for changes and builds on each change. When Jenkins is also used to push changes, then that can cause a never ending cycle of builds where Jenkins detects a change, performs a build, pushes a change from that build, then detects a change and starts again. With Freestyle projects there are (error-prone) techniques to ignore certain commits by author or by text in the commit message. Those same techniques are not universally available in Pipeline. Mark Waite On Tue, Mar 19, 2019 at 8:16 AM Eyal Goren <eyalg1...@gmail.com> wrote: > You mean how to do it in pipeline? > > On Tue, Mar 19, 2019, 2:46 PM <homo.sapien.9...@gmail.com wrote: > >> Hi Everybody, >> >> Using Jenkins, how to commit and push a code from local workspace >> (Windows) to Git Branch after every build executed in Jenkins >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Git for human beings" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to git-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Git for human beings" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to git-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Thanks! Mark Waite -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.