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

Failed to fetch from bitbucket private repository

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • RHEL 6. git-plugin and git-client are latest version.

      I am getting the following error when trying to fetch from a repo:
      FATAL: Failed to fetch from ssh://git@altssh.bitbucket.org:443/#####/#####-installation-profile.git
      hudson.plugins.git.GitException: Failed to fetch from ssh://git@altssh.bitbucket.org:443/#####/#####-installation-profile.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1325)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
      at hudson.model.Run.execute(Run.java:1516)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)
      Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://git@altssh.bitbucket.org:443/#####/#####-installation-profile.git +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout:
      stderr: Permission denied (publickey).

      I can log into the server as the jenkins user and verify that the keys I created work fine from the command line but for some reason it continues to fail from jenkins. I created a credential and added the ssh key that works to it but it doesn't seem to work within jenkins itself. Any ideas as to what I should check?

            mcbrihk Henry McBride
            mcbrihk Henry McBride
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: