diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-08-29 16:28:22 +0800 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2019-08-29 16:33:04 +0800 |
commit | a1ec2ad0b2638f084dffbe804b681c96dc6dadb8 (patch) | |
tree | eff3f8eee80adf8abdf7b656512f85ffee5527dd /lib/system_check | |
parent | b047359de5b365022d63b8da10a3a87f3ad92397 (diff) | |
download | gitlab-ce-a1ec2ad0b2638f084dffbe804b681c96dc6dadb8.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')
-rw-r--r-- | lib/system_check/app/authorized_keys_permission_check.rb | 4 |
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)}", |