summaryrefslogtreecommitdiff
path: root/lib/system_check/app/authorized_keys_permission_check.rb
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-08-29 16:28:22 +0800
committerPatrick Bajao <ebajao@gitlab.com>2019-08-29 16:33:04 +0800
commita1ec2ad0b2638f084dffbe804b681c96dc6dadb8 (patch)
treeeff3f8eee80adf8abdf7b656512f85ffee5527dd /lib/system_check/app/authorized_keys_permission_check.rb
parentb047359de5b365022d63b8da10a3a87f3ad92397 (diff)
downloadgitlab-ce-60071-remove-gitlab-keys-usage.tar.gz
Auto create authorized_keys file if doesn't exist60071-remove-gitlab-keys-usage
Utilize the auto repair functionality of system checks.
Diffstat (limited to 'lib/system_check/app/authorized_keys_permission_check.rb')
-rw-r--r--lib/system_check/app/authorized_keys_permission_check.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/system_check/app/authorized_keys_permission_check.rb b/lib/system_check/app/authorized_keys_permission_check.rb
index 1c581f88abc..1246a6875a3 100644
--- a/lib/system_check/app/authorized_keys_permission_check.rb
+++ b/lib/system_check/app/authorized_keys_permission_check.rb
@@ -14,6 +14,10 @@ module SystemCheck
authorized_keys.accessible?
end
+ def repair!
+ authorized_keys.create
+ end
+
def show_error
try_fixing_it([
"sudo chmod 700 #{File.dirname(authorized_keys.file)}",