Skip to content
rtyley edited this page Mar 7, 2013 · 21 revisions

Agit supports the git+ssh protocol, which is the most secure Git protocol and used by Github for private repositories. You need to use a separate app as your ssh-agent, and it will need to be installed first, before Agit.

Suitable SSH Apps

SSH-agent functionality is supported by several forks of the ConnectBot app. The original ConnectBot app by Kenny Root and Jeffrey Sharkey is sadly no longer maintained, but the functionality is available in alternative patched versions of ConnectBot available on the Google Play Store. Obviously, I can't vouch for apps I haven't created.

  • ConnectBot (ssh-agent) by the author of Agit, Roberto Tyley : A vanilla version of ConnectBot v1.7.1 with added ssh-agent support. Source
  • VX ConnectBot by Martin Matuška : An enhanced version of ConnectBot incorporating updates from Martin and patches from various other forks of ConnectBot. Source

Installation

A video demonstration of the install is here: http://www.youtube.com/watch?v=6YXR-ZhZ1Qk

The org.openintents.ssh.permission.ACCESS_SSH_AGENT permission needs to be registered on your Android device by installing the ssh-agent app before the installation of Agit, to ensure that Agit receives that permission. If you've already installed Agit before the ssh-agent, not to worry, just uninstall Agit and reinstall it once you've added the ssh-agent app.

Once the ssh-agent app is installed, import your ssh key into ConnectBot, unlock it and then you're good to go - enter your ssh-style repo-url and check it out!

You want to be careful that you've got everything right, as the error messages produced by Agit are currently not helpful, and if your first fetch fails, you may have to just try it again to ensure you get shown the relevant prompts.

Note that currently sync-fetches will silently skip your ssh repos if your SSH key is not available (ie, not unlocked). I'm planning to provide some better indication of this UI.

How it works

As part of the development of Agit I created a patch of ConnectBot which allows other android apps to use it as an ssh-agent. This means that Agit doesn't need to actually manage or even store SSH keys itself, which is pretty cool. You only need to trust one app with your SSH keys - e.g. ConnectBot, which already has great infrastructure for managing public keys - and all other apps defer to it for signing the cryptographic-challenges required to initiate an SSH session. See also http://www.openintents.org/en/node/882 .

Hope you like it - all feedback welcome!