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

Mercurial doesn't use credentials in multibranch pipeline

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • mercurial-plugin
    • Jenkins ver. 2.60.2 / Pipeline 2.5 / Pipeline: Multibranch 2.16 / Mercurial plugin 2.0

      Steps for reproducing:

      • create multibranch project;
      • add Mercurial as a source, select right credentials, add Mercurial Installation - Default
      • Save
      • Check Scan Multibranch Pipeline Log
      Started by user User
      [Wed Jul 26 12:21:59 GMT 2017] Starting branch indexing...
      Acquired master cache lock.
      $ /usr/bin/hg clone --noupdate ssh://hg@bitbucket.org/orgname/reponame /var/jenkins_home/hgcache/BC5CF33F611210F92F733E9440B2549700FC07D6-reponame
      remote: Permission denied (publickey).
      abort: no suitable response from remote hg!
      ERROR: Failed to clone ssh://hg@bitbucket.org/orgname/reponame
      Master cache lock released.
      ERROR: Could not use caches, not fetching branch heads
      [Wed Jul 26 12:22:01 GMT 2017] Finished branch indexing. Indexing took 1.4 sec
      Finished: SUCCESS
      
      

          [JENKINS-45806] Mercurial doesn't use credentials in multibranch pipeline

          We are having this issue as well. A workaround is to create a Mercurial installation in http://example.com/configureTools/ and add a custom configuration like this:

          [auth]
          domain.prefix = [mercurial_server_url]
          domain.username = [mercurial_username]
          domain.password = [mercurial_password]
          

          However, this will display the password in the scan log!

          Denis Blanchette added a comment - We are having this issue as well. A workaround is to create a Mercurial installation in http://example.com/configureTools/  and add a custom configuration like this: [auth] domain.prefix = [mercurial_server_url] domain.username = [mercurial_username] domain.password = [mercurial_password] However, this will display the password in the scan log!

          Jan Vrany added a comment -

          I have this problem too. Downgrade of Mercurial plugin to 1.61 fixed the problem.

          Interestingly, according to Mercurial plugin home, the version 2.0 is not listed in releases.

          Jan Vrany added a comment - I have this problem too. Downgrade of Mercurial plugin to 1.61 fixed the problem. Interestingly, according to Mercurial plugin home , the version 2.0 is not listed in releases.

          Jon Freedman added a comment -

          Also affected by this, had to downgrade and then re-save the properties for all jobs as the upgrade does not revert properly to 1.61 (to be fair Jenkins does warn you about this).

          Jon Freedman added a comment - Also affected by this, had to downgrade and then re-save the properties for all jobs as the upgrade does not revert properly to 1.61 (to be fair Jenkins does warn you about this).

          Code changed in jenkins
          User: Matthias Piepkorn
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialSCMSource.java
          http://jenkins-ci.org/commit/mercurial-plugin/60d0b64c7a4734a40b669194633a03bd49a3458c
          Log:
          JENKINS-45806 Mercurial doesn't use credentials in multibranch pipeline

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Matthias Piepkorn Path: src/main/java/hudson/plugins/mercurial/MercurialSCMSource.java http://jenkins-ci.org/commit/mercurial-plugin/60d0b64c7a4734a40b669194633a03bd49a3458c Log: JENKINS-45806 Mercurial doesn't use credentials in multibranch pipeline

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/mercurial/HgExe.java
          src/main/java/hudson/plugins/mercurial/MercurialSCMSource.java
          src/test/java/hudson/plugins/mercurial/MercurialSCMSource2Test.java
          http://jenkins-ci.org/commit/mercurial-plugin/df237041c8c794b6a66bf3a6535f471bafede82b
          Log:
          Merge pull request #111 from jglick/withCredentialsId-JENKINS-45806

          JENKINS-45806 withCredentialsId needed

          Compare: https://github.com/jenkinsci/mercurial-plugin/compare/622153cc7c5e...df237041c8c7

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/HgExe.java src/main/java/hudson/plugins/mercurial/MercurialSCMSource.java src/test/java/hudson/plugins/mercurial/MercurialSCMSource2Test.java http://jenkins-ci.org/commit/mercurial-plugin/df237041c8c794b6a66bf3a6535f471bafede82b Log: Merge pull request #111 from jglick/withCredentialsId- JENKINS-45806 JENKINS-45806 withCredentialsId needed Compare: https://github.com/jenkinsci/mercurial-plugin/compare/622153cc7c5e...df237041c8c7

            jglick Jesse Glick
            argus_k Dmytro Kozlovskyi
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: