Add SSH pubkey support to fetch_remote
gitlab-shell is used during repository mirroring to fetch git remotes.
In https://gitlab.com/gitlab-org/gitlab-ee/issues/98 I'm adding SSH public key authentication support to pull mirroring; this will require extra code and configuration in gitlab-shell to support.
Instead of doing that work in Ruby and managing an external ssh
process, including, in all likelihood, writing SSH private keys to $TMPDIR
, I'd instead like to use gitlab-shell's golang component to produce a binary using golang.org/x/crypto/ssh
and gopkg.in/src-d/go-git.v4
to do exactly what we want.
This is all-new functionality so there's no chance of regressions; we can continue to handle password authentication with the existing Ruby-shelling-out-to-git code for now, and migrate it over later if we feel the need.