hudson.plugins.git.GitException: Failed to fetch from git@github.com:jtnord/cjp-champagne-lib.git

Jenkins JIRA | James Nord | 1 year ago
  1. 0

    jenkins fails to clone a remote repo on windows - and the issue is it is passing invalid arguments to git_ssh. {noformat} > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url git@github.com:jtnord/cjp-champagne-lib.git # timeout=10 Cleaning workspace > git rev-parse --verify HEAD # timeout=10 No valid HEAD. Skipping the resetting > git clean -fdx # timeout=10 Fetching upstream changes from git@github.com:jtnord/cjp-champagne-lib.git > git --version # timeout=10 using GIT_SSH to set credentials temp ssh key for jenkins > git -c core.askpass=true fetch --tags --progress git@github.com:jtnord/cjp-champagne-lib.git +refs/heads/*:refs/remotes/origin/* ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from git@github.com:jtnord/cjp-champagne-lib.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$StepRunner.run(AbstractSynchronousNonBlockingStepExecution.java:75) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress git@github.com:jtnord/cjp-champagne-lib.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: plink: unknown option "-o" fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:761) ... 11 more {noformat} jenkins is run from the command line (java -jar .... as it is for testing purposes) on a windows machine. {{GIT_SSH}} is set in the windows environment to {{GIT_SSH=c:\Program Files (x86)\PuTTY\plink.exe}} The checkout is in a workflow which uses credentials (the following step) {noformat} checkout([$class: 'GitSCM', branches: [[name: '*/functions_timestamp']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanBeforeCheckout'], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'cjp-champagne-lib']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github', url: 'git@github.com:jtnord/cjp-champagne-lib.git']]]) {noformat}

    Jenkins JIRA | 1 year ago | James Nord
    hudson.plugins.git.GitException: Failed to fetch from git@github.com:jtnord/cjp-champagne-lib.git
  2. 0

    jenkins fails to clone a remote repo on windows - and the issue is it is passing invalid arguments to git_ssh. {noformat} > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url git@github.com:jtnord/cjp-champagne-lib.git # timeout=10 Cleaning workspace > git rev-parse --verify HEAD # timeout=10 No valid HEAD. Skipping the resetting > git clean -fdx # timeout=10 Fetching upstream changes from git@github.com:jtnord/cjp-champagne-lib.git > git --version # timeout=10 using GIT_SSH to set credentials temp ssh key for jenkins > git -c core.askpass=true fetch --tags --progress git@github.com:jtnord/cjp-champagne-lib.git +refs/heads/*:refs/remotes/origin/* ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from git@github.com:jtnord/cjp-champagne-lib.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$StepRunner.run(AbstractSynchronousNonBlockingStepExecution.java:75) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress git@github.com:jtnord/cjp-champagne-lib.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: plink: unknown option "-o" fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:761) ... 11 more {noformat} jenkins is run from the command line (java -jar .... as it is for testing purposes) on a windows machine. {{GIT_SSH}} is set in the windows environment to {{GIT_SSH=c:\Program Files (x86)\PuTTY\plink.exe}} The checkout is in a workflow which uses credentials (the following step) {noformat} checkout([$class: 'GitSCM', branches: [[name: '*/functions_timestamp']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanBeforeCheckout'], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'cjp-champagne-lib']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github', url: 'git@github.com:jtnord/cjp-champagne-lib.git']]]) {noformat}

    Jenkins JIRA | 1 year ago | James Nord
    hudson.plugins.git.GitException: Failed to fetch from git@github.com:jtnord/cjp-champagne-lib.git
  3. 0

    GitHub comment 14074#140928537

    GitHub | 1 year ago | ixdy
    hudson.plugins.git.GitException: Failed to fetch from https://github.com/kubernetes/kubernetes
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 14074#145682816

    GitHub | 1 year ago | ixdy
    hudson.plugins.git.GitException: Failed to fetch from https://github.com/kubernetes/kubernetes
  6. 0

    GitHub comment 141#159688567

    GitHub | 1 year ago | AtulKamra
    hudson.plugins.git.GitException: Failed to fetch from GIT Repository URL

    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 -c core.askpass=true fetch --tags --progress git@github.com:jtnord/cjp-champagne-lib.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: plink: unknown option "-o" fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl$1.execute
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313)
      4 frames
    3. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:761)
      2. hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012)
      3. hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043)
      3 frames
    4. org.jenkinsci.plugins
      AbstractSynchronousNonBlockingStepExecution$StepRunner.run
      1. org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      2. org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
      3. org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
      4. org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$StepRunner.run(AbstractSynchronousNonBlockingStepExecution.java:75)
      4 frames
    5. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      5. java.lang.Thread.run(Thread.java:745)
      5 frames