Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72283

Not able to connect with github.com when deployment is Started by an SCM change.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • git-plugin
    • None

      Hi Team,

      We are able to deploy the changes successfully when we are triggering the build manually.

      But deployment is failing when it is starting by SCM. Below is the error we are getting

      Started by an SCM change
      > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-903e64f849907b819f6326c803b73aa2/.git # timeout=10
      Setting origin to git@github.com:xxxxx.git
      > git config remote.origin.url git@github.com:xxxxx.git # timeout=10
      Fetching origin...
      Fetching upstream changes from origin
      > git --version # timeout=10
      > git --version # 'git version 2.34.1'
      > git config --get remote.origin.url # timeout=10
      using GIT_SSH to set credentials
      > git fetch --tags --force --progress – origin +refs/heads/:refs/remotes/origin/ # timeout=10
      hudson.plugins.git.GitException: Command "git fetch --tags --force --progress – origin +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout:
      stderr: ssh: connect to host github.com port 22: Connection timed out
      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:2842)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
      at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:395)
      at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:331)
      at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:421)
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:581)
      at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:99)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:442)
      Finished: FAILURE

      Note: There is no change in credential between direct build and SCM build.

      Can someone guide us to resolve the issue.

      Thanks,

            Unassigned Unassigned
            girija_patra Girija
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: