Commit graph

6 commits

Author SHA1 Message Date
Patrick Bajao
a1ec2ad0b2 Auto create authorized_keys file if doesn't exist
Utilize the auto repair functionality of system checks.
2019-08-29 16:33:04 +08:00
Patrick Bajao
b047359de5 Refactor specs to use one-liner expectation 2019-08-29 16:33:04 +08:00
Patrick Bajao
0e33f16b5f Add system check for authorized_keys file perm
This check is being removed from gitlab-shell as the file
is now being managed by gitlab-rails.
2019-08-29 16:33:04 +08:00
Patrick Bajao
6fcc65b513 Update Gitlab::AuthorizedKeys specs to be clearer 2019-03-21 12:42:31 +08:00
Patrick Bajao
983dcba3d4 Handle cases when authorized_keys doesn't exist
Modify Gitlab::AuthorizedKeys#rm_key and #list_key_ids to
handle cases when an `Errno::ENOENT` is raised.

Also added test cases in spec to ensure each method will
still work when authorized_keys doesn't exist.
2019-03-20 09:16:26 +08:00
Patrick Bajao
26dadbc9c4 Integrate Gitlab::Keys with Gitlab::Shell
In this commit, some methods that aren't being used
are removed from `Gitlab::Shell`. They are the ff:
- `#remove_keys_not_found_in_db`
- `#batch_read_key_ids`
- `#list_key_ids`

The corresponding methods in `Gitlab::Keys` have been
removed as well.
2019-03-19 11:16:21 +00:00