[JIRA] [core] (JENKINS-35105) Issue with git credentials InvalidObjectIdException

68 views
Skip to first unread message

rpampati@axiometrics.com (JIRA)

unread,
May 24, 2016, 3:24:01 PM5/24/16
to jenkinsc...@googlegroups.com
Rishi Pampati created an issue
 
Jenkins / Bug JENKINS-35105
Issue with git credentials InvalidObjectIdException
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2016/May/24 7:23 PM
Environment: Jenkins version 2.6 on Windows OS
Priority: Blocker Blocker
Reporter: Rishi Pampati

javax.servlet.ServletException: org.eclipse.jgit.errors.InvalidObjectIdException: Invalid id :
C:\Windows\TEMP\hudson8725852661617820
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.jgit.errors.InvalidObjectIdException: Invalid id :
C:\Windows\TEMP\hudson8725852661617820
at org.eclipse.jgit.lib.ObjectId.fromHexString(ObjectId.java:245)
at org.eclipse.jgit.lib.ObjectId.fromString(ObjectId.java:233)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2470)
at hudson.plugins.git.UserRemoteConfig$DescriptorImpl.doCheckUrl(UserRemoteConfig.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
... 62 more

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
May 28, 2016, 3:18:01 AM5/28/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
May 28, 2016, 3:18:01 AM5/28/16
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Component/s: git-plugin
Component/s: core

o.v.nenashev@gmail.com (JIRA)

unread,
May 28, 2016, 3:18:02 AM5/28/16
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
May 28, 2016, 9:10:01 AM5/28/16
to jenkinsc...@googlegroups.com
Mark Waite resolved as Cannot Reproduce
 

I'm closing this bug report because I cannot duplicate it. It contains insufficient information.

If the original author provides more information, it can be reopened (if it can be duplicated).

Things that I was able to guess from the stack trace (and which the submitter should have provided with the original submission, rather than just cutting and pasting a stack trace):

Master is running on Windows, running git client plugin 1.19.6 (likely), and git plugin 2.4.4 (possibly). Command line git is the implementation used in this stack trace.

  1. User created a new job
  2. User entered the URL to the repository in the URL field of the job
  3. User probably did not enter any credentials for the repository (unclear, but hinted by code)
  4. When the user tabbed out of the field, the InvalidObjectIdException was thrown when the git plugin asked the git client plugin to report the most recent revision on the repository

Some crucial questions that aren't answered by the stack trace include:

  • Is command line git installed on the Windows machine?
  • Are any other git commands working on the Windows machine?
  • Is the Jenkins process on the Windows machine running as a service or as a user?
  • What is the URL of the repository?
  • Does the repository require credentials, and were they provided by the user?
  • Where is the repository hosted (github, bitbucket, internal by user, etc.) and what version of the hosting software is being used?
  • What other steps had the user taken when the problem appeared?
  • Does the problem happen repeatedly on that Jenkins machine?
  • Does the problem happen repeatedly on other Jenkins machines?
  • Can the user clone the repository to that Jenkins machine from the command line?
Change By: Mark Waite
Status: Open Resolved
Resolution: Cannot Reproduce

danieltmendes2@gmail.com (JIRA)

unread,
Jun 7, 2016, 9:30:01 AM6/7/16
to jenkinsc...@googlegroups.com
Daniel Mendes commented on Bug JENKINS-35105
 
Re: Issue with git credentials InvalidObjectIdException

I had the same problem but it was to be using the path to the git-cmd.exe instead of bin / git.exe

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 7, 2016, 9:52:01 AM6/7/16
to jenkinsc...@googlegroups.com

Daniel Mendes one of my Windows test machines has C:\Program Files\Git\cmd\git.exe as the path for the git executable and yet I've never seen this report. Can you offer any other hints of things that might be different between your environment and my test environment?

danieltmendes2@gmail.com (JIRA)

unread,
Jun 8, 2016, 9:31:03 AM6/8/16
to jenkinsc...@googlegroups.com

Try changing the path of Git from [...]\git.exe to \Git\git+-cmd+.exe in Global Tool Configuration > Path to Git executable.
For me the problem is the executable. Changing the configuration to \bin\git.exe works properly.

Stacktrace in the job configuration screen:

javax.servlet.ServletException: org.eclipse.jgit.errors.InvalidObjectIdException: Invalid id :
C:\Windows\TEMP\hudson5779965468065115

C:\Windows\TEMP\hudson5779965468065115


at org.eclipse.jgit.lib.ObjectId.fromHexString(ObjectId.java:245)
at org.eclipse.jgit.lib.ObjectId.fromString(ObjectId.java:233)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2470)
at hudson.plugins.git.UserRemoteConfig$DescriptorImpl.doCheckUrl(UserRemoteConfig.java:156)

at sun.reflect.GeneratedMethodAccessor598.invoke(Unknown Source)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
... 62 more

Build of job with the wrong settings:

Started by user Administrator
Building in workspace C:\Program Files (x86)\Jenkins\jobs\g4srv-app-integration-lib-src\workspace
> C:\Program Files\Git\git-cmd.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> C:\Program Files\Git\git-cmd.exe config remote.origin.url https://[...].git # timeout=10
Fetching upstream changes from https://[...].git
> C:\Program Files\Git\git-cmd.exe --version # timeout=10
using .gitcredentials to set credentials
> C:\Program Files\Git\git-cmd.exe --version # timeout=10
[WARNING] Installed git version too old for credentials support
> C:\Program Files\Git\git-cmd.exe config --local credential.username [...] # timeout=10
> C:\Program Files\Git\git-cmd.exe config --local credential.helper store --file=\"C:\Windows\TEMP\git7912762825862649974.credentials\" # timeout=10
> C:\Program Files\Git\git-cmd.exe --version # timeout=10
> C:\Program Files\Git\git-cmd.exe fetch --tags https://[...].git +refs/heads/:refs/remotes/origin/
> C:\Program Files\Git\git-cmd.exe config --local --remove-section credential # timeout=10
> C:\Program Files\Git\git-cmd.exe rev-parse "refs/remotes/origin/master^

{commit}

" # timeout=10
FATAL: Invalid id: C:\Program Files (x86)\Jenkins\jobs\g4srv-app-integration-lib-src\workspace>
java.lang.IllegalArgumentException: Invalid id: C:\Program Files (x86)\Jenkins\jobs\g4srv-app-integration-lib-src\workspace>
at org.eclipse.jgit.lib.ObjectId.fromString(ObjectId.java:232)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:682)
at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
at hudson.plugins.git.util.DefaultBuildChooser.getHeadRevision(DefaultBuildChooser.java:129)
at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:111)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:995)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Finished: FAILURE

danieltmendes2@gmail.com (JIRA)

unread,
Jun 8, 2016, 9:31:07 AM6/8/16
to jenkinsc...@googlegroups.com
Daniel Mendes edited a comment on Bug JENKINS-35105
Try changing the path of Git from [...]\git.exe to \Git\git + *-cmd* + .exe in Global Tool Configuration > Path to Git executable.

For me the problem is the executable. Changing the configuration to \bin\git.exe works properly.

*Stacktrace in the job configuration screen:*
*Build of job with the wrong settings:*


Started by user Administrator
Building in workspace C:\Program Files (x86)\Jenkins\jobs\g4srv-app-integration-lib-src\workspace
 > C:\Program Files\Git\git-cmd.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > C:\Program Files\Git\git-cmd.exe config remote.origin.url https://[...].git # timeout=10
Fetching upstream changes from https://[...].git
 > C:\Program Files\Git\git-cmd.exe --version # timeout=10
using .gitcredentials to set credentials
 > C:\Program Files\Git\git-cmd.exe --version # timeout=10
[WARNING] Installed git version too old for credentials support
 > C:\Program Files\Git\git-cmd.exe config --local credential.username [...] # timeout=10
 > C:\Program Files\Git\git-cmd.exe config --local credential.helper store --file=\"C:\Windows\TEMP\git7912762825862649974.credentials\" # timeout=10
 > C:\Program Files\Git\git-cmd.exe --version # timeout=10
 > C:\Program Files\Git\git-cmd.exe fetch --tags https://[...].git +refs/heads/*:refs/remotes/origin/*

danieltmendes2@gmail.com (JIRA)

unread,
Jun 8, 2016, 9:32:02 AM6/8/16
to jenkinsc...@googlegroups.com
Daniel Mendes edited a comment on Bug JENKINS-35105
Try changing the path of Git from [...]\git.exe to \Git\git*-cmd*.exe in Global Tool Configuration > Path to Git executable.

danieltmendes2@gmail.com (JIRA)

unread,
Jun 8, 2016, 9:32:02 AM6/8/16
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:34:37 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Cannot Reproduce
 
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages