Thanks for building git-sync! I have looked for something like this in the past and am glad that it now exists.
Currently git-sync only supports HTTP based auth and I would love for it to support SSH. The nice thing about SSH is that it avoids having to set up individual access tokens (along with their necessary scopes, perms, expiration) for any forges that I might want to use with git-sync - it can instead read my existing SSH config and automatically determine the appropriate key to use for a given forge.
I had an agent have a crack at this and after a bunch of back and forth, it seems to have made a working implementation. The implementation abstracts the transport layer into a new interface and supports SSH auth by using the local ssh binary.
I tried testing it manually by syncing some repos between GitHub and GitLab and it worked as expected. It was a simple:
git-sync sync "git@github.com:user/repo.git" "git@gitlab.com:user/repo.git"
The implementation is far from mergeable right now, but if the maintainers are open to adding SSH support to git-sync, I can take a proper look at it, clean it up and try opening a PR.
Thanks for building
git-sync! I have looked for something like this in the past and am glad that it now exists.Currently
git-synconly supports HTTP based auth and I would love for it to support SSH. The nice thing about SSH is that it avoids having to set up individual access tokens (along with their necessary scopes, perms, expiration) for any forges that I might want to use withgit-sync- it can instead read my existing SSH config and automatically determine the appropriate key to use for a given forge.I had an agent have a crack at this and after a bunch of back and forth, it seems to have made a working implementation. The implementation abstracts the transport layer into a new interface and supports SSH auth by using the local
sshbinary.I tried testing it manually by syncing some repos between GitHub and GitLab and it worked as expected. It was a simple:
The implementation is far from mergeable right now, but if the maintainers are open to adding SSH support to
git-sync, I can take a proper look at it, clean it up and try opening a PR.