Git pull error from jenkins script console

48 views
Skip to first unread message

madhur...@wowlabz.com

unread,
Oct 13, 2014, 7:11:04 AM10/13/14
to jenkins...@googlegroups.com
I want to do git pull from jenkins script console (or jenkins cli) using groovy script, but I'm getting error as follows:

Mon Oct 13 13:40:45 IST 2014 || git pull || 2 IN: ERR: /usr/lib/git-core/git-pull: 11: .: git-sh-setup: not found

The git-sh-setup file is present and also I have set the path in jenkins but still not works on jenkins while this thing works from terminal. I have tested this on ubuntu 12.04 & 14.04.

corneil....@gmail.com

unread,
Oct 13, 2014, 7:53:33 AM10/13/14
to jenkins...@googlegroups.com
Are you using the same user in terminal as jenkins is using to execute the scripts?

--
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 jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

madhur...@wowlabz.com

unread,
Oct 13, 2014, 8:03:34 AM10/13/14
to jenkins...@googlegroups.com
Yes, even with the same user as in terminal & in jenkins (i.e. jenkins user created on installation of jenkins) this problem happens

Chanda Unmack

unread,
Oct 13, 2014, 5:57:00 PM10/13/14
to jenkins...@googlegroups.com

On Mon, Oct 13, 2014 at 5:03 AM, <madhur...@wowlabz.com> wrote:
Yes, even with the same user as in terminal & in jenkins (i.e. jenkins user created on installation of jenkins) this problem happens

On Monday, October 13, 2014 5:23:33 PM UTC+5:30, Corneil du Plessis wrote:
Are you using the same user in terminal as jenkins is using to execute the scripts?

On 13 October 2014 13:11, <madhur...@wowlabz.com> wrote:
I want to do git pull from jenkins script console (or jenkins cli) using groovy script, but I'm getting error as follows:

Mon Oct 13 13:40:45 IST 2014 || git pull || 2 IN: ERR: /usr/lib/git-core/git-pull: 11: .: git-sh-setup: not found

The git-sh-setup file is present and also I have set the path in jenkins but still not works on jenkins while this thing works from terminal. I have tested this on ubuntu 12.04 & 14.04.

I've found that even logging in as the same user that jenkins users, the paths are not the same. Best results for our set up is with using either full paths, or setting the path at the beginning of the script, depending on the situation.

ymmv
--
Confidentiality Notice: This e-mail, including all attachments, is confidential information of Lytro, Inc. If the reader of this e-mail is not the intended recipient or its authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.

madhur...@wowlabz.com

unread,
Oct 14, 2014, 1:47:05 AM10/14/14
to jenkins...@googlegroups.com
I've tried with full paths but it gives error that can't execute /path/to/git from /path/to/repo (ubuntu environment).

How should I set path at the beginning of script? Script is to be made in groovy to be executed from jenkins script console.
Reply all
Reply to author
Forward
0 new messages