* There is no Windows involved, it's a pure Linux (Debian) setup.
* There is no slave involved, all Jenkins jobs run on the same server.
* I changed "*origin/${TAG_TO_BUILD}*" to "*${TAG_TO_BUILD}*" - but if I
read the error right, I don't even get that far. The plugin first try to
fetch all the tags from the remote, and it's only after that step that it
will try to do a rev-parse on the local repo.
If I look at the console output of a parameterized build with the default
value (master), I get this:
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L1>Started
by user admin <http://ci.itextsupport.com/user/admin>
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L2>Building
in workspace /var/lib/jenkins/jobs/**********/workspace
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L3>
> git rev-parse --is-inside-work-tree # timeout=10
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L4>Fetching
changes from the remote Git repository
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L5>
> git config remote.origin.url ssh://git@**********/**********/**********.git
# timeout=10
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L6>Fetching
upstream changes from ssh://**********/**********/**********.git
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L7>
> git --version # timeout=10
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L8>using
GIT_SSH to set credentials key for gitlab
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L9>
> git -c core.askpass=true fetch --tags --progress
ssh://git@**********/**********/**********.git
+refs/heads/*:refs/remotes/origin/*
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L10>
> git rev-parse origin/master^{commit} # timeout=10
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L11>Checking
out Revision 8466cba68962a5b4fbeff263b221e3e384d094c9 (origin/master)
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L12>
> git config core.sparsecheckout # timeout=10
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L13>
> git checkout -f 8466cba68962a5b4fbeff263b221e3e384d094c9
<http://ci.itextsupport.com/view/Git%20Master%20and%20Release%20builds/job/itextpdf-master/3/consoleFull#L14>First
time build. Skipping changelog.
So as you can see, there the `git rev-parse` command works just fine, and `git
fetch --tags` before that doesn't complain either.
What I'm going to do next, is replace the Git Tag parameter with a String
parameter, and see what happens next.
On Monday, February 16, 2015 at 4:46:50 PM UTC+1, Mark Waite wrote:
>
>
>
>
> On Mon, Feb 16, 2015 at 6:22 AM, Amedee Van Gasse <[email protected]
> <javascript:>> wrote:
>
>> I have this in the logs:
>> (********** is just to obfuscate the url)
>>
>> I don't understand why I get permission denied. Maybe because of
>> core.askpass=true? Because authentication works without password, we use
>> ssh keys.
>>
>>
> I don't think the "core.askpass=true" argument has anything to do with
> this problem.
>
> When I configure a similar job using a private github repository with an
> ssh key, it seems like the git parameter plugin is attempting to perform a
> Unix style credentials operation on the Windows slave agent which is
> hosting the build. At least I think that is why the Jenkins log file on
> the master node (Ubuntu) includes an entry which says:
>
>
> Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true
> fetch --tags --progress [email protected]:MarkEWaite/git-client-plugin.git
> +refs/heads/*:refs/remotes/origin/*" returned status code 1:
>
>
> <http://mark-pc1.markwaite.net/markwaite/check_mk/wato.py?mode=pattern_editor&host=mark-pc1&file=/var/log/jenkins/jenkins.log&match=stdout%3A%20Process%20leaked%20file%20descriptors.%20See%20http%3A//wiki.jenkins-ci.org/display/JENKINS/Spawning%2Bprocesses%2Bfrom%2Bbuild%20for%20more%20information>
> stdout: Process leaked file descriptors. See
> http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build
> for more information
>
>
> <http://mark-pc1.markwaite.net/markwaite/check_mk/wato.py?mode=pattern_editor&host=mark-pc1&file=/var/log/jenkins/jenkins.log&match=Process%20leaked%20file%20descriptors.%20See%20http%3A//wiki.jenkins-ci.org/display/JENKINS/Spawning%2Bprocesses%2Bfrom%2Bbuild%20for%20more%20information>
> Process leaked file descriptors. See
> http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build
> for more information
>
>
> <http://mark-pc1.markwaite.net/markwaite/check_mk/wato.py?mode=pattern_editor&host=mark-pc1&file=/var/log/jenkins/jenkins.log&match=>
>
>
> <http://mark-pc1.markwaite.net/markwaite/check_mk/wato.py?mode=pattern_editor&host=mark-pc1&file=/var/log/jenkins/jenkins.log&match=stderr%3A%20Could%20not%20create%20directory%20%27/var/lib/jenkins/.ssh%27.>
> stderr: Could not create directory '/var/lib/jenkins/.ssh'.
>
>
> <http://mark-pc1.markwaite.net/markwaite/check_mk/wato.py?mode=pattern_editor&host=mark-pc1&file=/var/log/jenkins/jenkins.log&match=>
>
>
> I'm not sure if the git parameter plugin is ready for the use case of a
> parameter being evaluated from a workspace on a slave agent.
>
> Unfortunately, switching to force the build on the master node did not
> resolve the issue for me either.
>
>
>> Feb 16, 2015 2:17:34 PM WARNING org.eclipse.jetty.util.log.JavaUtilLog warn
>>
>> Error while serving
>> **********-master/descriptorByName/net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition/fillValueItems
>> java.lang.reflect.InvocationTargetException
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: hudson.plugins.git.GitException: Command "git -c
>> core.askpass=true fetch --tags --progress **********
>> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
>> stdout:
>> stderr: Permission denied, please try again.
>> Permission denied, please try again.
>> Permission denied (publickey,password).
>> fatal: The remote end hung up unexpectedly
>>
>> at
>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
>> at
>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379)
>> at
>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
>> at
>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
>> at
>> net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition.generateContents(GitParameterDefinition.java:314)
>> at
>> net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition$DescriptorImpl.doFillValueItems(GitParameterDefinition.java:536)
>> ... 85 more
>>
>>
>> On Monday, February 16, 2015 at 1:01:36 PM UTC+1, Amedee Van Gasse wrote:
>>
>>> Jenkins version: 1.593
>>> Git Parameter Plug-In
>>> <http://wiki.jenkins-ci.org/display/JENKINS/Git+Parameter+Plugin>: 0.4.0
>>> GIT client plugin
>>> <http://wiki.jenkins-ci.org/display/JENKINS/Git+Client+Plugin>: 1.16.1
>>>
>>>
>>> I have a parameterized build.
>>> My parameter is Git Parameter.
>>>
>>> Name: TAG_TO_BUILD
>>> Description:
>>> Parameter type: Branch or tag
>>> Branch filter: *
>>> Tag filter: *
>>> Tag sort mode: DESCENDING_SMART
>>> Default value: master
>>>
>>> Source code management:
>>> Branches to build: origin/${TAG_TO_BUILD}
>>>
>>
> I think you want to declare "Branch to build" as "*${TAG_TO_BUILD}*"
> rather than "*origin/${TAG_TO_BUILD}*". At least that was one of the
> changes I had to make while exploring what you reported.
>
> Why is that change needed? It seems that git tags don't associate with a
> remote, so on the git-client-plugin source repository, the "git rev-parse
> git-client-1.10.0" command works:
>
> $ git rev-parse git-client-1.10.0
> 2b8dd77821fc95a73b309b440e745b3e146c1e74
>
> While the "git rev-parse origin/git-client-1.10.0" command fails:
>
> $ git rev-parse origin/git-client-1.10.0
> origin/git-client-1.10.0
> fatal: ambiguous argument 'origin/git-client-1.10.0': unknown revision or
> path not in the working tree.
> Use '--' to separate paths from revisions, like this:
> 'git <command> [<revision>...] -- [<file>...]'
>
> I still don't see all the correct behaviors from the git parameter plugin,
> but at least that one change to your job definition will allow you to
> continue exploring.
>
>
>
>>
>>> When I Build with parameters, I always get "Retrieving Git
>>> references...":
>>>
>>> This build requires parameters:
>>> TAG_TO_BUILD
>>> Retrieving Git references…
>>> You must have built the project at least once, to get entries in the
>>> list above.
>>> If you wipe out your workspace, the plugin needs to clone the repository
>>> before it can list the tags/revisions. This may take some time if you have
>>> a slow connection or the repository is big.
>>>
>>> I always get this, the box is never filled with branches or tags, even
>>> after I built the project without specifying a parameter (it was
>>> successfully built with branch master).
>>>
>>> Is there something else that I am missing here?
>>>
>>> --
>>> Amedee
>>>
>> --
>> 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] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/625b2f19-d0c4-4729-bf3b-467854840b1d%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jenkinsci-users/625b2f19-d0c4-4729-bf3b-467854840b1d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> 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
"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/172b05b9-ff80-40eb-84f8-63ee0ec9b83f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.