-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Affects Version/s: None
-
Component/s: Enterprise
-
None
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"}]}