Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-4966

Stash returns a 500 error through the API if you try to add an SSH access key to a repo while ssh access keys are disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 3.1.3, 3.2.0
    • None
    • Enterprise
    • None

    Description

      When attempting to add an SSH key while SSH access keys are disabled on the Stash server, Stash throws a 500 Internal server error.

      This should probably be a 400 or 405.

      See sample request/response below.

      > POST /rest/keys/1.0/projects/FE/repos/jquery/ssh?xoauth_requestor_id=lpater HTTP/1.1
      > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
      > Host: stash-app.internal.atlassian.com
      > Accept: */*
      > Authorization: Basic BASIC:BASIC
      > Content-Type: application/json
      > Content-Length: 881
      > 
      * upload completely sent off: 881out of 881 bytes
      < HTTP/1.1 500 Internal Server Error
      < Date: Tue, 08 Jul 2014 09:14:57 GMT
      < Server: Apache-Coyote/1.1
      < X-AREQUESTID: 554x512524x12
      < X-AUSERNAME: lpater
      < X-AUSERID: 1211
      < X-ASESSIONID: 3rkavi
      < Cache-Control: no-cache, no-transform
      < Vary: X-AUSERNAME,Accept-Encoding
      < Content-Type: application/json;charset=UTF-8
      < X-Content-Type-Options: nosniff
      < Connection: close
      < Transfer-Encoding: chunked
      < 
      * Closing connection #0
      {"errors":[{"context":null,"message":"Support for SSH access keys has been disabled. Please contact an administrator","exceptionName":"com.atlassian.stash.ssh.api.SshKeyAccessDisabledException"}]}
      

      Attachments

        Activity

          People

            mstudman Michael Studman (Inactive)
            rstephens Richard Stephens (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: