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

"Checkout over SSH" fails the build since it still uses HTTPS urls

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins ver. 2.60.2
      Cloudbees BitBucket Branch Source Plugin v. 2.2.3

      I've configured the option "Checkout over SSH". Yet, the HTTPS url is used, as we can see in the build log:

       

      Branch indexing
      Checking out git https://bitbucket.org/my-org/my-app-android.git into /var/jenkins_home/workspace/-app-android_avoid-os-clone-3HZZVSGHH7HARS2F37PQWWMN7OXA3M6XXBAQKXVEMDJZEPDIH6VQ@script to read Jenkinsfile
      Cloning the remote Git repository
      Cloning with configured refspecs honoured and without tags
      Cloning repository https://bitbucket.org/my-org/my-app-android.git
      > git init /var/jenkins_home/workspace/-app-android_avoid-os-clone-3HZZVSGHH7HARS2F37PQWWMN7OXA3M6XXBAQKXVEMDJZEPDIH6VQ@script # timeout=10
      Fetching upstream changes from https://bitbucket.org/my-org/my-app-android.git
      > git -version # timeout=10
      > git fetch -no-tags -progress https://bitbucket.org/my-org/my-app-android.git +refs/heads/avoid-os-clone:refs/remotes/origin/avoid-os-clone
      ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException: Command "git fetch -no-tags -progress https://bitbucket.org/my-org/my-app-android.git +refs/heads/avoid-os-clone:refs/remotes/origin/avoid-os-clone" returned status code 128:
      stdout: 
      stderr: remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
      fatal: Authentication failed for 'https://bitbucket.org/my-org/my-app-android.git/'
      

          [JENKINS-46094] "Checkout over SSH" fails the build since it still uses HTTPS urls

          Also getting this issue with Jenkins 2.121.3.

          Justin Tennant added a comment - Also getting this issue with Jenkins 2.121.3.

          We're also having this error with Jenkins 2.138 and a Github Enterprise Organization. Every checkout tries to use HTTPS even though the "Checkout over SSH" options are set at the Organization level. 

          Russell Endicott added a comment - We're also having this error with Jenkins 2.138 and a Github Enterprise Organization. Every checkout tries to use HTTPS even though the "Checkout over SSH" options are set at the Organization level. 

          Liam Newman added a comment -

          Submitted PR to fix in bitbucket: https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/170

          Will create one for github as well shortly. 

          Liam Newman added a comment - Submitted PR to fix in bitbucket: https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/170 Will create one for github as well shortly. 

          Liam Newman added a comment -

          Liam Newman added a comment - Submitted PR to fix in GitHub: https://github.com/jenkinsci/github-branch-source-plugin/pull/205  

          Liam Newman added a comment -

          Checked Gitea plugin.  Looks like it is okay. 

           

          Liam Newman added a comment - Checked Gitea plugin.  Looks like it is okay.   

          Liam Newman added a comment -

          Bitbucket has been published.
          I will publish github today.

          Liam Newman added a comment - Bitbucket has been published. I will publish github today.

          Liam Newman added a comment -

          Published 2.4.5

          Liam Newman added a comment - Published 2.4.5

          Al Forbes added a comment -

          https://github.com/jenkinsci/bitbucket-branch-source-plugin/releases

          I did not find the 2.4.5 release. Are publish and release different things? If someone has time, a 2.4.5 release would be highly appreciated.

          Al Forbes added a comment - https://github.com/jenkinsci/bitbucket-branch-source-plugin/releases I did not find the 2.4.5 release. Are publish and release different things? If someone has time, a 2.4.5 release would be highly appreciated.

          Liam Newman added a comment -

          java4africa
          2.4.5 of github branch source.
          For bitbucket, the fix is in 2.4.2.

          Liam Newman added a comment - java4africa 2.4.5 of github branch source. For bitbucket, the fix is in 2.4.2.

          Matthijs Kool added a comment -

          It appears this issue (or something very similar) is also present in the Gitea plugin. I have a Gitea organization configured with "Checkout over SSH" enabled. This works fine as long as Jenkins is not restarted. After a Jenkins restart, the build attempts to git clone using HTTP(s) instead of SSH. If I then click the "Scan Gitea Organization Now" button, the build again uses SSH.

          Jenkins version 2.176.1
          Gitea plugin version 1.1.2

          Matthijs Kool added a comment - It appears this issue (or something very similar) is also present in the Gitea plugin. I have a Gitea organization configured with "Checkout over SSH" enabled. This works fine as long as Jenkins is not restarted. After a Jenkins restart, the build attempts to git clone using HTTP(s) instead of SSH. If I then click the "Scan Gitea Organization Now" button, the build again uses SSH. Jenkins version 2.176.1 Gitea plugin version 1.1.2

            bitwiseman Liam Newman
            elifarley Elifarley
            Votes:
            3 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: