hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git

Jenkins JIRA | Ron MacNeil | 2 years ago
  1. 0

    We use a global property called "RepoRoot" to specify where our Git repositories live, so our repository URL's look similar to: ${RepoRoot}/RepoA.git ${RepoRoot}/RepoB.git This works fine when jobs actually run: {code} ... Fetching changes from the remote Git repository > git.exe config remote.origin.url https://github.com/Foo/RepoA.git # timeout=10 Cleaning workspace > git.exe rev-parse --verify HEAD # timeout=10 Resetting working tree > git.exe reset --hard # timeout=10 > git.exe clean -fdx # timeout=10 Fetching upstream changes from https://github.com/Foo/RepoA.git > git.exe --version # timeout=10 using .gitcredentials to set credentials > git.exe config --local credential.helper store --file=\"C:\Users\FOO\AppData\Local\Temp\git6742298409525835661.credentials\" # timeout=10 > git.exe -c core.askpass=true fetch --tags --progress https://github.com/Foo/RepoA.git +refs/heads/*:refs/remotes/origin/* ... {code} But we're seeing errors similar to the following in our polling log: {code} Fetching upstream changes from ${RepoRoot}/RepoA.git > git.exe --version # timeout=10 > git.exe -c core.askpass=true fetch --tags --progress ${RepoRoot}/RepoA.git +refs/heads/*:refs/remotes/origin/* FATAL: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:518) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:380) at hudson.scm.SCM.poll(SCM.java:397) at org.jenkinsci.plugins.multiplescms.MultiSCM.compareRemoteRevisionWith(MultiSCM.java:92) at hudson.scm.SCM.poll(SCM.java:397) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1462) at hudson.model.AbstractProject._poll(AbstractProject.java:1433) at hudson.model.AbstractProject.poll(AbstractProject.java:1344) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) 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: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:695) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:598) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:516) ... 16 more Caused by: hudson.plugins.git.GitException: Command "git.exe -c core.askpass=true fetch --tags --progress ${RepoRoot}/RepoA.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: repository 'https://github.com/Foo/RepoA.git/' not found at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1457) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1245) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:85) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:280) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:693) ... 18 more Done. Took 2.3 sec {code} If I hard-code the repo root rather than use the global property reference, polling starts working. From the polling log, it appears as though the polling code is: 1. Not resolving global property references in repo URLs when assembling git command lines 2. Possibly incorrectly appending trailing forward slash characters to repo URLs Thanks folks, love your work.

    Jenkins JIRA | 2 years ago | Ron MacNeil
    hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git
  2. 0

    We use a global property called "RepoRoot" to specify where our Git repositories live, so our repository URL's look similar to: ${RepoRoot}/RepoA.git ${RepoRoot}/RepoB.git This works fine when jobs actually run: {code} ... Fetching changes from the remote Git repository > git.exe config remote.origin.url https://github.com/Foo/RepoA.git # timeout=10 Cleaning workspace > git.exe rev-parse --verify HEAD # timeout=10 Resetting working tree > git.exe reset --hard # timeout=10 > git.exe clean -fdx # timeout=10 Fetching upstream changes from https://github.com/Foo/RepoA.git > git.exe --version # timeout=10 using .gitcredentials to set credentials > git.exe config --local credential.helper store --file=\"C:\Users\FOO\AppData\Local\Temp\git6742298409525835661.credentials\" # timeout=10 > git.exe -c core.askpass=true fetch --tags --progress https://github.com/Foo/RepoA.git +refs/heads/*:refs/remotes/origin/* ... {code} But we're seeing errors similar to the following in our polling log: {code} Fetching upstream changes from ${RepoRoot}/RepoA.git > git.exe --version # timeout=10 > git.exe -c core.askpass=true fetch --tags --progress ${RepoRoot}/RepoA.git +refs/heads/*:refs/remotes/origin/* FATAL: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:518) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:380) at hudson.scm.SCM.poll(SCM.java:397) at org.jenkinsci.plugins.multiplescms.MultiSCM.compareRemoteRevisionWith(MultiSCM.java:92) at hudson.scm.SCM.poll(SCM.java:397) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1462) at hudson.model.AbstractProject._poll(AbstractProject.java:1433) at hudson.model.AbstractProject.poll(AbstractProject.java:1344) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) 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: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:695) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:598) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:516) ... 16 more Caused by: hudson.plugins.git.GitException: Command "git.exe -c core.askpass=true fetch --tags --progress ${RepoRoot}/RepoA.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: repository 'https://github.com/Foo/RepoA.git/' not found at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1457) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1245) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:85) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:280) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:693) ... 18 more Done. Took 2.3 sec {code} If I hard-code the repo root rather than use the global property reference, polling starts working. From the polling log, it appears as though the polling code is: 1. Not resolving global property references in repo URLs when assembling git command lines 2. Possibly incorrectly appending trailing forward slash characters to repo URLs Thanks folks, love your work.

    Jenkins JIRA | 2 years ago | Ron MacNeil
    hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from ${RepoRoot}/RepoA.git
  3. 0

    Bitbucket Hook fails for Jenkins Project

    Stack Overflow | 7 months ago | Matthias
    hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://user@bitbucket.org/company/project.git
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.IllegalStateException: Cannot open session, connection is not authenticated.

    GitHub | 2 years ago | macq-npokrovskaya
    hudson.plugins.git.GitException: Failed to fetch from https://jenkins@stash.macq.eu/scm/ebuttf/macqclient.git
  6. 0

    How do I setup Git version control on Jenkins (on Windows)

    Stack Overflow | 3 years ago | Ed .
    hudson.plugins.git.GitException: Could not clone https://git.company.local/scm/project.git

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Command "git.exe -c core.askpass=true fetch --tags --progress ${RepoRoot}/RepoA.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: repository 'https://github.com/Foo/RepoA.git/' not found

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl$1.execute
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1457)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1245)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:85)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:280)
      4 frames
    3. Hudson GIT plugin
      GitSCM.compareRemoteRevisionWith
      1. hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:693)
      2. hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:598)
      3. hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:516)
      3 frames
    4. Hudson
      SCM.poll
      1. hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:380)
      2. hudson.scm.SCM.poll(SCM.java:397)
      2 frames
    5. org.jenkinsci.plugins
      MultiSCM.compareRemoteRevisionWith
      1. org.jenkinsci.plugins.multiplescms.MultiSCM.compareRemoteRevisionWith(MultiSCM.java:92)
      1 frame
    6. Hudson
      SequentialExecutionQueue$QueueEntry.run
      1. hudson.scm.SCM.poll(SCM.java:397)
      2. hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1462)
      3. hudson.model.AbstractProject._poll(AbstractProject.java:1433)
      4. hudson.model.AbstractProject.poll(AbstractProject.java:1344)
      5. hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515)
      6. hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544)
      7. hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      7 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      2. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      3. java.util.concurrent.FutureTask.run(Unknown Source)
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      6. java.lang.Thread.run(Unknown Source)
      6 frames