simple_dvc.discover_ssh_remote module

The idea is ssh into the remote, check where the cache dir is, and then set it correctly on our end. This requires that the DVC repo is in the same location relative to the home dir on the remote machine, but otherwise assumptions are minimal.

class simple_dvc.discover_ssh_remote.DiscoverSshRemoteCLI(*args, **kwargs)[source]

Bases: DataConfig

If you have a DVC repo checked out on another machine with the same directory layout (with respect to your home drive) as this machine, then this command finds the location of the cache on that remote machine and adds an appropriate DVC remote in this repo that references it.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]

Example

>>> # xdoctest: +SKIP
>>> from simple_dvc.discover_ssh_remote import *  # NOQA
>>> cmdline = 0
>>> kwargs = dict()
>>> cls = DiscoverSshRemoteCLI
>>> cls.main(cmdline=cmdline, **kwargs)
default = {'dry': <Value(False)>, 'force': <Value(False)>, 'forward_ssh_agent': <Value(False)>, 'host': <Value(None)>}
simple_dvc.discover_ssh_remote.main(cmdline=1, **kwargs)

Example

>>> # xdoctest: +SKIP
>>> from simple_dvc.discover_ssh_remote import *  # NOQA
>>> cmdline = 0
>>> kwargs = dict()
>>> cls = DiscoverSshRemoteCLI
>>> cls.main(cmdline=cmdline, **kwargs)
simple_dvc.discover_ssh_remote._getcwd()[source]

Workaround to get the working directory without dereferencing symlinks. This may not work on all systems.

References

https://stackoverflow.com/questions/1542803/getcwd-dereference-symlinks

simple_dvc.discover_ssh_remote.git_default_push_remote_name()[source]
simple_dvc.discover_ssh_remote.dvc_discover_ssh_remote(host, remote=None, forward_ssh_agent=False, dry=False, force=False)[source]