Verigreen / verigreen

Verigreen is a lightweight, server side solution for verification of git commits. It is a gated check-in process which will not allow any failed CI commit to go into an integration/release/any protected branch. We keep it green (hence the name).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repository Not Found java.lang.RuntimeException: Failed to fetch from [refs/remotes/origin/*] to [refs/heads/*]

santhosh103 opened this issue · comments

Hello,

i am installing Verigreen and getting this errror (Repository Not found). Have configured the git.repositoryLocation like below..

git.repositoryLocation=/var/lib/verigreen/config/verirepo.git/.git

Is there any configuration missing from my side. Please help.

Regards
Santhosh

Hi Santhosh!

Is this using our docker image?
Is the folder used off the host or withing the container?
Please take a look at the wiki.

If the folder above is on the host running docker, no need to update the config file, just update the environment variable $REPO_DIR used in step 11 of the wiki.

Please keep us updated on your progress.

Thanks,
Eli

@santhosh103 just to make sure, do you actually have a folder name "verirepo.git" or this is a mistake?

Hi Eli,

I am following 'Deploy Verigreen over the Tomcat 7 Web Server' steps and tried to install based on that. I have created a local GIT repo (named for eg. verirepo) sorry Soninob earlier i had mentioned verirepo.git as folder name by mistake. Thanks for the correction.

the path of the repo is for eg. /var/lib/verigreen/config/verirepo/.git. I have kept 'config.properties' file inside the config folder. Is that ok. Is my repo path configuration correct?

Waiting for your valuable inputs.

Thanks so much

Regards
Santhosh

So far, it sounds correct, if you still have problems, please share your config.properties file and the output of 'echo $VG_HOME'.
If there are any errors, please paste them also.

I am using Java 1.8 & Tomcat 7

Please find the contents of config.properties along with the Errors below:

Jenkins Configuration

jenkins.url=http://jenkinsurl:8080/
jenkins.user=emailid@somedomain.com
jenkins.password=passwprd
##############Changes in this field will be effected after save (no restart is needed)################
#Warning! Do not change the jobName parameter while there are commits being verified in the system!
jenkins.jobName=<1JobNameToVerifyInJenkins>
jenkins.branchParamName=SCM_BRANCH
#The maximum number of seconds Verigreen waits for a verification build to complete.
jenkins.timeoutInSeconds=3600

Git configuration

git.repositoryLocation=/var/lib/verigreen/verirepo/.git
##############Changes in this field will be effected after save (no restart is needed)################
git.protectedBranches=refs/heads/master
##############Changes in this field will be effected after save (no restart is needed)################
git.permittedUsers=testgit@git.somedomain.com

#JGitOperator configuration
#These sets Verigreen's user.name and user.email git configuration parameters.
commited.by.collector=testgit
email.address=emaild@somedomain.com

Mail Configuration

#The SMTP server Verigreen will use to send its emails.
#SMTP authentication is not currently supported.
mail.server=localhost

#Collector Display Name
collectors=repo
#The URL of the Verigreen collector.
#This is the address that need be configured in the Verigreen git-hook configuration file, hook.properties.

Add / after the port number, if deployed as war.

#This parameter is required for Verigreen to work.
collector.address=http://collectordomain/verigreen/rest

Verigreen Internal Configuration

#CacheCleanerJob and BranchCleanerJob configuration.
#0 => Remove all but Running commits.
daysThreashold=3
#How many hours to wait before Verigreen runs its cache and branch cleaning jobs.
repeatHourlyForever=24

#JobScheduler configuration
#The number of seconds after which Verigreen wakes up to process any undone items in the commit item list.
repeatSecondlyForever=10
#The number of iterations to wait before attempting to re-trigger a new build for a verification.
timeout.counter=4
#The number of Jenkins build re-trigger attempts before it is setting the commit as Trigger_Failed.
default_count=3

#Queue Manager:
#The maximum number of commits Verigreen will run verification for at the same time.
#Set this to no more than the number of concurrent verification builds that Jenkins can run simultaneously.
number.commits=5

#The number of attempts Verigreen makes to verify the configured Jenkins Job exists.
job.retry.counter=3

#Force push password hash
hash.password=c21e299d9ec8db9718e162aca10689317d94f34f

##############Changes in this field will be effected after save (no restart is needed)################
#enable/disable retry of Failed commits
full.push=disabled

#Additional parameters that be be sent to Jenkins.
#Set value to 'true' (without quotes) to send the key/value pair using below key name.
#Alternatively, set the value to the Jenkins String Parameter name.
jenkinsparam.mode=params
jenkinsparam.longid=false
jenkinsparam.parent=false
jenkinsparam.protected=false
jenkinsparam.commitid=false
jenkinsparam.committer=false

FAQ Page Configuration

#Enable offline FAQ page
#In case the Internet connection is limited or restricted this parameter should be set to true in order to have access to the FAQ page
#If there are no restrictions this parameter should be set to false, the FAQ page being accessed directly on the github page
#Set to true and provide below offline URLs and files as needed.
faq.offline.git=faqpage.html#q-i-got-a-git_failure-status-what-does-it-mean
faq.offline.timeout=faqpage.html#q-i-got-a-time_out-status-what-does-it-mean
#These properties should not be changed
faq.online.git=https://github.com/Verigreen/verigreen/wiki/Verigreen-FAQ#q-i-got-a-git_failure-status-what-does-it-mean
faq.online.trigger=https://github.com/Verigreen/verigreen/wiki/Verigreen-FAQ#q-i-got-a-trigger_failed-status-what-does-it-mean
faq.online.timeout=https://github.com/Verigreen/verigreen/wiki/Verigreen-FAQ#q-i-got-a-time_out-status-what-does-it-mean

faq.offline.git=faqpage.html#q-i-got-a-git_failure-status-what-does-it-mean
faq.offline.trigger=faqpage.html#q-i-got-a-trigger_failed-status-what-does-it-mean
faq.offline.timeout=faqpage.html#q-i-got-a-time_out-status-what-does-it-mean


Output of echo $VG_HOME below:

/usr/share/verigreen/config

Error:

Oct 29, 2016 9:54:19 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Oct 29, 2016 9:54:19 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/servlet-api-6.0.26.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Oct 29, 2016 9:54:20 AM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Oct 29, 2016 9:54:22 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
29/10/16 09:54:22:022 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.spring.CollectorSpringContextLoaderListener::loadParentContext (tid: 37) *** Loading spring definitions...
*** END ***
Oct 29, 2016 9:54:22 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@5de93957: startup date [Sat Oct 29 09:54:22 IST 2016]; root of context hierarchy
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-api-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-branch-cleaner-job-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-cache-cleaner-job-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-common-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-container-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-handlers-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-jbosscache-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-jenkins-server-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-jenkins-verifier-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-jobs-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition
INFO: Overriding bean definition for bean 'jenkinsUpdater': replacing [Generic bean: class [com.verigreen.collector.buildverification.JenkinsUpdater]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-context.xml]] with [Generic bean: class [com.verigreen.collector.buildverification.JenkinsUpdater]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-jobs-context.xml]]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/vg-common-2.5.6.jar!/Spring/command-executer-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [jar:file:/usr/share/apache-tomcat-7.0.72/webapps/verigreen/WEB-INF/lib/vg-common-2.5.6.jar!/Spring/timeboundedexecuter-context.xml]
Oct 29, 2016 9:54:22 AM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from URL [file:/usr/share/verigreen/config/config.properties]
Oct 29, 2016 9:54:22 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@de70c20: defining beans [collectorAddress,postVerigreenNeededRequest,jenkinsCallRequest,branchCleanerJob,cacheCleanerJob,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,collectorVersion,jgitOperator,emailSender,verigreenNeededLogic,labLogger,commitItemDescriptorContainer,collector,jenkinsUpdater,checkinDecisionHandler,onSuccessByChildHandler,onFailedByParentHandler,cacheInstance,jenkinsServer,verificationJobName,branchParamName,jenkinsVerifier,commitItemVerifier,commitItemCanceler,commitItemVerifierManager,jobScheduler,teqCommandExecuter,timeBoundedExecuter]; root of factory hierarchy
Oct 29, 2016 9:54:22 AM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.core.LocalVariableTableParameterNameDiscoverer.inspectClass(LocalVariableTableParameterNameDiscoverer.java:110)
at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:85)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1051)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:955)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at com.verigreen.common.spring.SpringContextLoader.loadContext(SpringContextLoader.java:56)
at com.verigreen.collector.spring.CollectorSpringContextLoaderListener.loadParentContext(CollectorSpringContextLoaderListener.java:34)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1312)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:690)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

Oct 29, 2016 9:54:22 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Oct 29, 2016 9:54:22 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/verigreen] startup failed due to previous errors

@santhosh103 - java8 is not supported, please Eder to #54.
Regardless, in your properties file, make sure you put value Jenkins.jobname

Thanks @soninob for your inputs. I will correct that.

Hi @soninob ,

I am reopening this issue.

So far i am successful in getting the verigreen collector and could able to configure the pre-recieve hook. Also i am able to see that there is a temperory branch created in my Repo whenever i push code to the repo.

But the jobs are not getting triggered at Jenkins side and getting GIT FAILURE error. I have checked the FAQ section about GIT FAILURE. My Repo configuration seems to be correct. What could be the reason. Pasting below the part of the errors for your reference..


04/11/16 12:49:13:013 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.jobs.CallJenkinsJob::calllingJenkinsForUpdate (tid: 19) *** Jenkins called for update on [0] not updated items...
*** END ***
**### 04/11/16 12:49:21:021 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** (tid: 43) *** VerigreenNeeded [_verigreenNeeded=true, _shouldRejectCommit=false, _reason=branch [vg_99d9e88_root] already exists and its status is [Failed due to git failure, could be a techincal issue]]
*** END *****
04/11/16 12:49:21:021 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.common.Watchdir::run (tid: 15) *** Modify: history.json
*** END ***
04/11/16 12:49:21:021 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.rest.BranchResource::post (tid: 46) *** CommitItem created CommitItem [
_branchDescriptor=BranchDescriptor [_protectedBranch=refs/heads/master, _newBranch=vg_99d9e88_root, _commiter=root@example],
_mergedBranchName=vg_99d9e88_root_new_1478262438693, _status=Not started, _creationTime=2016-11-04 12:49:21.33, _runTime=null, _endTime=2016-11-04 12:47:53.107, _buildUrl=0, _isDone=false, _parent=null, _child=null, _timeoutCounter=0, _retriableCounter=0, _triggeredAttempt=false, _buildNumberToStop=0]
*** END ***

04/11/16 12:49:23:023 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.DecisionExecuter::doExecute (tid: 18) * Going to run decision (Decision [commitItemId=c8127c53-7e1e-4459-b686-936f47f9a890, handler=class com.verigreen.collector.decision.CheckinDecisionHandler])
*** END ***
04/11/16 12:49:23:023 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.CheckinDecisionHandler::doUpdateBranch (tid: 18) *** Going to merge branch with latest changes... (vg_99d9e88_root)
*** END ***
**## 04/11/16 12:49:23:023 ERROR [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.CheckinDecisionHandler::updateBranch (tid: 18) *** Failed updating branch [vg_99d9e88_root] *** END ***
java.lang.RuntimeException: Failed to fetch from [refs/remotes/origin/
] to [refs/heads/
]

## Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://git@localhost:10022/verigreen_user/verigreen-test-project.git: UnknownHostKey: localhost. RSA key fingerprint is 4b:68:7e:8c:f4:23:31:13:4b:3f:f2:bd:be:0c:b4:c3
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137) ~[org.eclipse.jgit-3.0.0.201306101825-r.jar:3.0.0.201306101825-r]
at com.verigreen.jgit.JGitOperator.fetch(JGitOperator.java:150) ~[verigreen-collector-api-2.5.6.jar:?]
... 12 more
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git@localhost:10022/verigreen_user/verigreen-test-project.git: UnknownHostKey: localhost. RSA key fingerprint is 4b:68:7e:8c:f4:23:31:13:4b:3f:f2:bd:be:0c:b4:c3
at ... 12 more
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: localhost. RSA key fingerprint is 4b:68:7e:8c:f4:23:31:13:4b:3f:f2:bd:be:0c:b4:c3
at com.jcraft.jsch.Session.checkHost(Session.java:786) ~[jsch-0.1.50.jar:?]
at com.jcraft.jsch.Session.connect(Session.java:342) ~[jsch-0.1.50.jar:?]
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116) ~[org.eclipse.jgit-3.0.0.201306101825-r.jar:3.0.0.201306101825-r]

04/11/16 12:49:33:033 INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.OnFailureHandler::doHandle (tid: 21) *** Commit (vg_99d9e88_root) verification completed with failure (Failed due to git failure, could be a techincal issue)
*** END ***

Hello,
Now it is triggering job at Jenkins side. It started working after I gave full write permission to .git folder on the repository and started pushing from the server. But it is giving issue if i push from my local system. Could you please help me with the permissions. What all permissions required for .git folder. I am getting the below error (from catalina.out). Please guide.

INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.OnFailureHandler::doHandle (tid: 26) *** Commit (vg_8286968_Santhosh) verification completed with failure (Failed to merge automatically, try solving the conflicts and re-commit)
*** END ***

ERROR [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.DecisionExecuter::doExecute (tid: 18) *** Decision handler failed (Decision [_commitItemId=72ac78f4-4f15-4567-a4a7-64cfae637bef, _handler=class com.verigreen.collector.decision.OnFailureHandler]) *** END ***
java.lang.NullPointerException

It seems to me like permissions in the Jenkins job itself. Make sure that the user that runs and triggers the build have the right permissions.

Thanks @soninob

could you please give me some more details on what permission should i give for Jenkins user to merge the commits. Do i have to configure separately in Jenkins or Do i have to configure the same user in GITLAB.

I suggest that for start, add anonymous permissions for the job (all permissions), and after that you will be able to understand the right one.

soninob - if you saw any typos, please consider, email was sent via cell phone

??-6 ????? 2016, ???? 15:49, ??santhosh103 ?<notifications@github.commailto:notifications@github.com> ???/?:?

Thanks @soninobhttps://github.com/soninob

could you please give me some more details on what permission should i give for Jenkins user to merge the commits. Do i have to configure separately in Jenkins or Do i have to configure the same user in GITLAB.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/120#issuecomment-258682011, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACj0zutzbCWQFzj5rcHx45Dqs1K8qTyxks5q7drQgaJpZM4KeD1b.

Updated the permission to test whether the merge is working or not on Jenkins side. But still getting the same error mentioned above (NullPointerException) error. Should I enable auto merge on GIT side. even if it is a new file which i am committing from my local system, it is throwing the same error.

@santhosh103 - please try to go to your working directory (where you deployed VG and clone your own repo) and try to push something directly from it. see if it working fine or you getting any errors.
Waiting for your feedback

@soninob -

It works when i directly push from the server where i deployed VG and the place where i cloned the repository. It also triggered Jenkins. But when i clone the same repo in my local VM and try to push, the verification message comes in the console but did not trigger Jenkins. Getting the error "Failed to update branch.." . Pasting the error below.. Please guide..

INFO [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.OnFailureHandler::doHandle (tid: 26) *** Commit (vg_8286968_Santhosh) verification completed with failure (Failed to merge automatically, try solving the conflicts and re-commit)
*** END ***

ERROR [com.verigreen.collector.common.log4j.VerigreenLogger] *** com.verigreen.collector.decision.DecisionExecuter::doExecute (tid: 18) *** Decision handler failed (Decision [_commitItemId=72ac78f4-4f15-4567-a4a7-64cfae637bef, _handler=class com.verigreen.collector.decision.OnFailureHandler]) *** END ***
java.lang.NullPointerException

regards
Santhosh

The last error indicates a git problem. It seems that your local env and your working directory are not align (see error, it is indicate a conflict). Make sure that your head is pointing to the same commit and try again.

hey @santhosh103,
Will you able to fix the issue?
Can we close this one?

Thanks @soninob . Yes it worked after giving permission to .git folder.
We can close this.