Handle invalid ssh exception

This commit is contained in:
randx 2012-08-29 00:44:26 +03:00
parent c48c0f95b2
commit b03ee4666b
3 changed files with 14 additions and 2 deletions

View file

@ -14,6 +14,10 @@ class ApplicationController < ActionController::Base
render "errors/gitolite", layout: "error"
end
rescue_from Gitlab::Gitolite::InvalidKey do |exception|
render "errors/invalid_ssh_key", layout: "error"
end
rescue_from Encoding::CompatibilityError do |exception|
render "errors/encoding", layout: "error", status: 404
end

View file

@ -0,0 +1,3 @@
%h1 Git Error
%hr
%p Seems like SSH Key you provided is not a valid SSH key.