summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-03-21 16:34:32 +0000
committerNick Thomas <nick@gitlab.com>2019-03-21 16:34:32 +0000
commit1bc4ee3f9a06a8d8fc70b97db90ca5e8e3434604 (patch)
treec4bce015df3a5eb84b8cb6e471c716b081b2a290 /lib
parent284d3e563e71ef011f131e76edb6159c8622226a (diff)
parent6fcc65b51330bec6bde577d1bf761f69b6f8605a (diff)
downloadgitlab-ce-1bc4ee3f9a06a8d8fc70b97db90ca5e8e3434604.tar.gz
Merge branch '10514-fix-non-existing-authorized-keys-file' into 'master'
Handle cases when authorized_keys doesn't exist See merge request gitlab-org/gitlab-ce!26347
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/authorized_keys.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/authorized_keys.rb b/lib/gitlab/authorized_keys.rb
index 609d2bd9c77..3fe72f5fd43 100644
--- a/lib/gitlab/authorized_keys.rb
+++ b/lib/gitlab/authorized_keys.rb
@@ -68,6 +68,8 @@ module Gitlab
end
true
+ rescue Errno::ENOENT
+ false
end
# Clear the authorized_keys file
@@ -96,6 +98,8 @@ module Gitlab
end
end
end
+ rescue Errno::ENOENT
+ []
end
private