Jump to >

reviewboard.ssh.utils

humanize_key(key)[source]

Returns a human-readable key as a series of hex characters.

is_ssh_uri(url)[source]

Returns whether or not a URL represents an SSH connection.

check_host(netloc, username=None, password=None, namespace=None)[source]

Checks if we can connect to a host with a known key.

This will raise an exception if we cannot connect to the host. The exception will be one of BadHostKeyError, UnknownHostKeyError, or SCMError.

register_rbssh(envvar)[source]

Registers rbssh in an environment variable.

This is a convenience method for making sure that rbssh is set properly in the environment for different tools. In some cases, we need to specifically place it in the system environment using os.putenv, while in others (Mercurial, Bazaar), we need to place it in os.environ.