hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO}

Jenkins JIRA | smruti sahoo | 7 months ago
  1. 0

    Steps to reproduce - Manage Jenkins => Configure System => Global properties => Environment variables Add Name = GITHUB_HOST Value = <github IP address> Name = GITHUB_REPO Value = <github repo path> Create a job Under job configuration define git repository as below https://${GITHUB_HOST}/${GITHUB_REPO} provide user/pass for credential complete the job configuration Trigger SCM poll by using curl (Note - provide your Jenkins host in following command) curl http://${JENKINS_SERVER}/jenkins/git/notifyCommit?url=https://\$"\{GITHUB_HOST\}"/\$"\{GITHUB_REPO\}" It'll poll the corresponding job but if you see Git SCM poll log, it's dumping the following error {color:red}In short - It's not able to expand the global variable {color} > /usr/bin/git --version # timeout=10 > /usr/bin/git -c core.askpass=true fetch --tags --progress https://${GITHUB_HOST}/${GITHUB_REPO} +refs/heads/*:refs/remotes/origin/* FATAL: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO} hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO} at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:573) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381) at hudson.scm.SCM.poll(SCM.java:398) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1468) at hudson.model.AbstractProject._poll(AbstractProject.java:1438) at hudson.model.AbstractProject.poll(AbstractProject.java:1349) at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:526) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:555) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO} at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:701) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:571) ... 14 more Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://${GITHUB_HOST}/${GITHUB_REPO} +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: remote: Invalid username or password.

    Jenkins JIRA | 7 months ago | smruti sahoo
    hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO}
  2. 0

    Steps to reproduce - Manage Jenkins => Configure System => Global properties => Environment variables Add Name = GITHUB_HOST Value = <github IP address> Name = GITHUB_REPO Value = <github repo path> Create a job Under job configuration define git repository as below https://${GITHUB_HOST}/${GITHUB_REPO} provide user/pass for credential complete the job configuration Trigger SCM poll by using curl (Note - provide your Jenkins host in following command) curl http://${JENKINS_SERVER}/jenkins/git/notifyCommit?url=https://\$"\{GITHUB_HOST\}"/\$"\{GITHUB_REPO\}" It'll poll the corresponding job but if you see Git SCM poll log, it's dumping the following error {color:red}In short - It's not able to expand the global variable {color} > /usr/bin/git --version # timeout=10 > /usr/bin/git -c core.askpass=true fetch --tags --progress https://${GITHUB_HOST}/${GITHUB_REPO} +refs/heads/*:refs/remotes/origin/* FATAL: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO} hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO} at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:573) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381) at hudson.scm.SCM.poll(SCM.java:398) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1468) at hudson.model.AbstractProject._poll(AbstractProject.java:1438) at hudson.model.AbstractProject.poll(AbstractProject.java:1349) at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:526) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:555) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO} at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:701) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:571) ... 14 more Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://${GITHUB_HOST}/${GITHUB_REPO} +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: remote: Invalid username or password.

    Jenkins JIRA | 7 months ago | smruti sahoo
    hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO}
  3. 0

    [JIRA] [git-plugin] (JENKINS-34603) git scm poll not working with global environment variable

    Google Groups | 7 months ago | asks...@gmail.com (JIRA)
    hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from <a href="https://$" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://$</a></p> {GITHUB_HOST}/${GITHUB_REPO}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] [github-plugin] (JENKINS-30980) Github polls fails when the Branches to build is different from empty for private repositories

    Google Groups | 1 year ago | federicon@al.com.au (JIRA)
    hudson.util.IOException2: hudson.plugins.git.GitException: Command <span class="code-quote" style="color: #009100">&quot;git -c core.askpass=<span class="code-keyword" style="color: #000091; color: #009100">true</span> ls-remote -h http:<span class="code-comment" style="color: #808080">//github.mycompamy.com/myorg/myrepo&quot;</span> returned status code 128: </span>stdout: stderr: remote: Repository not found. fatal: repository 'http:<span class="code-comment" style="color: #808080">//github.mycompamy.com/myorg/myrepo/' not found </span>
  6. 0

    [JENKINS-24809] Github-Jenkins Trigger issue with slave - Jenkins JIRA

    jenkins-ci.org | 7 months ago
    hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: C:\Program Files (x86)\Git\cmd\git.exe ls-remote -h ssh:

    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

      Failed to fetch from https://${GITHUB_HOST}/${GITHUB_REPO}

      at hudson.plugins.git.GitSCM.fetchFrom()
    2. Hudson GIT plugin
      GitSCM.compareRemoteRevisionWith
      1. hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
      2. hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:701)
      3. hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:571)
      3 frames
    3. Hudson
      AbstractProject.poll
      1. hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381)
      2. hudson.scm.SCM.poll(SCM.java:398)
      3. hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1468)
      4. hudson.model.AbstractProject._poll(AbstractProject.java:1438)
      5. hudson.model.AbstractProject.poll(AbstractProject.java:1349)
      5 frames
    4. jenkins.triggers
      SCMTriggerItem$SCMTriggerItems$Bridge.poll
      1. jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:119)
      1 frame
    5. Hudson
      SequentialExecutionQueue$QueueEntry.run
      1. hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:526)
      2. hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:555)
      3. hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
      3 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      5. java.lang.Thread.run(Thread.java:745)
      5 frames