Before anyone guns me down..I have looked at all the messages that has this error but they seem to manifest from a different problem,I couldn't get any substantial information. Following are the errors I'm running into in the git polling log...
I don't have a clue regarding error #1,please provide inputs
For this,I read on other questions that $GERRIT_REFSPEC gets filled in dynamically when there is a gerrit trigger but i don't understand why I keep seeing this in the git poll log. How can I fix this ?
Error messages:
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Command "/usr/bin/git fetch -t ssh://company.com:29418/platform/vendor/proprietary/mla.git $GERRIT_REFSPEC" returned status code 128: stdout: stderr: fatal: Couldn't find remote ref $GERRIT_REFSPEC
As of May 2016, this error may be result of fix for SECURITY-170 introduced in Jenkins 2.3 or 1.651.2.
From wiki:
One of the affected plugins is the Gerrit Trigger. The issue you should watch for updates is here.
However, please note that the Rado's solution to definine the
GERRIT_REFSPEC
parameter manually in build config can solve this problem temporarily if you build only one branch from Gerrit.A workaround is available by adding the following JAVA_ARGS to /etc/default/jenkins on ubuntu
You could also add which variables should be allowed
Looks like you ran a Jenkins Gerrit Trigger build manually? The trigger page says,
https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger
After solving this issue if Jenkins is still not pulling the latest code commit(un-merged) then, need to Add Additional Behaviours -> Strategy for choosing what to build -> Gerrit Trigger
Reference: Thanks to Fabian
It took me some time to search for how to add this string parameter mentioned in the Gerrit Trigger plugin manual. I use Jenkins 1.567 with Gerrit Trigger 2.11.1.