git_well.git_discover_remote module

class git_well.git_discover_remote.GitDiscoverRemoteCLI(*args: Any, **kwargs: Any)[source]

Bases: DataConfig

Attempt to discover a ssh remote based on an ssh host.

Like git-sync, the remote machine must have the same directory structure relative to the home drive.

Valid options: []

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

  • **kwargs – keyword arguments for this data config

repo_dpath: Value
host: Value
remote: Value
home: Value
forward_ssh_agent: Value
test_remote: Value
remote_cwd: Value
classmethod main(argv: list[str] | str | bool | None = True, **kwargs: Any) None[source]

Example

>>> from git_well.git_discover_remote import GitDiscoverRemoteCLI
>>> from git_well.repo import Repo
>>> cls = GitDiscoverRemoteCLI
>>> repo = Repo.demo()
>>> # TODO: make a plausible scenario
>>> argv = False
>>> kwargs = dict()
>>> kwargs['repo_dpath'] = repo
>>> import pytest
>>> with pytest.raises(Exception):
>>>     cls.main(argv=argv, **kwargs)
default = {'forward_ssh_agent': <Value(False)>, 'home': <Value(None)>, 'host': <Value(None)>, 'remote': <Value(None)>, 'remote_cwd': <Value(None)>, 'repo_dpath': <Value('.')>, 'test_remote': <Value(True)>}
git_well.git_discover_remote.fsspec_shh_connect(host: str) Any[source]
git_well.git_discover_remote.main(argv: list[str] | str | bool | None = True, **kwargs: Any) None

Example

>>> from git_well.git_discover_remote import GitDiscoverRemoteCLI
>>> from git_well.repo import Repo
>>> cls = GitDiscoverRemoteCLI
>>> repo = Repo.demo()
>>> # TODO: make a plausible scenario
>>> argv = False
>>> kwargs = dict()
>>> kwargs['repo_dpath'] = repo
>>> import pytest
>>> with pytest.raises(Exception):
>>>     cls.main(argv=argv, **kwargs)