Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18225

Unable to add Bitbucket Server repository into Bamboo

    XMLWordPrintable

Details

    Description

      Summary

      If "Manage trusted keys" option is enabled and Bamboo is configured to use local SSH for Git, it is not possible to create Bitbucket Server repository in Bamboo server

      Steps to Reproduce

      1. Enable "Manage trusted keys" at Administration >> Security >> Security settings
      2. Add SSH capability at Administration >> Build Resources >> Server capabilities
        Capability type: Git
        Executable: SSH
        
      3. Create Bitbucket Server repository in Bamboo

      Expected Results

      It will show the message to add a SSH key into "Trusted keys", eg:

      Could not test connection. Please add key 'localhost/127.0.0.1:7999' 'ssh-rsa AAAAB3Nza...' to the list of trusted keys. See 'Trusted keys' documentation for details.
      

      Actual Results

      It just show the following message:

      Could not test connection. Please add your repository host SSH key to the list of trusted keys. See 'Trusted keys' documentation for details.
      

      From the log, the SSH key is created by Bamboo and uploaded to Bitbucket Server:

      2017-03-02 18:08:03,562 INFO [http-nio-8085-exec-15] [BitbucketServerServerConfigurator] Public key was added to Bitbucket Server (Bamboo user: kahloun.foong, application: Bitbucket [http://localhost:7990], location: repository TST/stash): ssh-rsa AAAAB3NzaC1... http://localhost:8085
      2017-03-02 18:08:03,636 INFO [http-nio-8085-exec-15] [BitbucketServerServerConfigurator] Can't authenticate with Bitbucket Server despite successful public key storage: ssh-rsa AAAAB3NzaC1... http://localhost:8085
      

      Even though this SSH key is added into "Trusted keys", clicking the "Save repository" button in the above Step 3 will generate a different SSH key

      Notes

      Bamboo should show the generated SSH key when using local SSH for Git

      Workaround

      1. Delete the SSH capability at Bamboo Administration >> Build Resources >> Server capabilities >> Git
      2. Try to add/edit Bitbucket Server repository again at Bamboo Administration >> Build Resources >> Linked repositories
      3. From the error message that show the SSH key, add the SSH key into Bamboo Administration >> Security >> Trusted keys
      4. Click on the "Save repository" button again at Bamboo Administration >> Build Resources >> Linked repositories

      Attachments

        Activity

          People

            mgardias Marcin Gardias
            klfoong Foong (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: