Merge the gitlab-shell "gitlab-keys" functionality into GitLab CE
This issue is along similar lines to https://gitlab.com/gitlab-org/gitlab-ce/issues/41016
When using "normal" SSH key management, i.e., handling ~git/.ssh/authorized_keys
, we use the gitlab-shell/bin/gitlab-keys
binary to manage the file, adding and removing keys in bulk.
We don't actually use this code at all on GitLab.com, as we have "fast SSH key lookup" enabled.
In discussion with @DouweM, this script came up, as we're looking to rewrite gitlab-shell in Go. For this particular part of it, I don't think it makes any sense for it to be a subprocess any more, or in gitlab-shell at all. As we did with gitlab_projects, moving the code into the gitlab-ce repository and modifying the file directly from sidekiq has benefits in terms of performance and reducing complexity. In particular, we no longer need to worry about process supervision.