SSH push mirroring support with public-key authentication
It is not uncommon for Git access to be restricted to SSH only, GitLab even allows Admins to restrict Git access protocols to Only SSH. It is impossible to use push mirroring to a Git server that does not allow HTTP/S access.
We should add support for SSH to push mirroring, in the same way as was done for pull mirroring in gitlab-ee#98 (closed)
There are many situations where HTTP access may not be possible for push mirroring, including security and legacy system configurations that cannot easily be changed.
Using SSH push mirroring also has the benefit of only granting write access to the repository, not the entire API scope of project/user that an access token or password would.
This feature has many moving parts. Items here:
- Port SSH host key detection to CE !22577 (merged)
- SSH pubkey auth in Gitaly UpdateRemoteMirror RPC gitaly-proto!236 (merged)
- Gitaly support for SSH pubkey auth gitaly!959 (merged)
- gitlab-rails support for SSH push mirroring !22982 (merged) gitlab-ee!8116 (merged)
- Refactor and big database migration to clean things up gitlab-ee#2954 (closed)
Following the same workflow as SSH pull mirroring:
- Automatically detect or manually enter SSH host keys
- Authenticate via password or public key (GitLab will automatically generate a private key and display the public key to be added to the other server)