class_docstr: Create a dataset sibling on a UNIX-like Shell (local or SSH)-accessible machine
  
  Given a local dataset, and a path or SSH login information this command
  creates a remote dataset repository and configures it as a dataset sibling
  to be used as a publication target (see `publish` command).
  
  Various properties of the remote sibling can be configured (e.g. name
  location on the server, read and write access URLs, and access
  permissions.
  
  Optionally, a basic web-viewer for DataLad datasets can be installed
  at the remote location.
  
  This command supports recursive processing of dataset hierarchies, creating
  a remote sibling for each dataset in the hierarchy. By default, remote
  siblings are created in hierarchical structure that reflects the
  organization on the local file system. However, a simple templating
  mechanism is provided to produce a flat list of datasets (see
  --target-dir).
docstr: Figure out setting of sharedrepository for dataset's `name` remote
docstr_tok: ["Figure","out","setting","of","sharedrepository","for","dataset","'s","`","name","`","remote"]
code: def _get_ds_remote_shared_setting(ds, name, ssh):
      """Figure out setting of sharedrepository for dataset's `name` remote"""
      shared = None
      try:
          # TODO -- we might need to expanduser taking .user into account
          # but then it must be done also on remote side
          out = CreateSibling._run_on_ds_ssh_remote(
              ds,
              name,
              ssh,
              "git -C {path} config --get core.sharedrepository",
          )
          shared = out.strip()
      except CommandError as e:
          ce = CapturedException(e)
          lgr.debug(
              "Could not figure out remote shared setting of %s for %s due "
              "to %s",
              ds,
              name,
              ce,
          )
          # could well be ok if e.g. not shared
          # TODO: more detailed analysis may be?
      return shared
  
imports: import logging
  import os
  from os.path import curdir
  import shlex
  from os.path import join
  from os.path import normpath, relpath
  from looseversion import LooseVersion
  from datalad import ssh_manager
  from datalad.cmd import CommandError, StdOutErrCapture, WitlessRunner
  from datalad.consts import TIMESTAMP_FMT, WEB_META_LOG
  from datalad.core.local.diff import diff_dataset
  from datalad.distribution.dataset import Dataset, EnsureDataset, datasetmethod, require_dataset, resolve_path
  from datalad.distribution.siblings import Siblings, _DelayedSuper
  from datalad.interface.base import Interface, build_doc, eval_results
  from datalad.interface.common_opts import annex_group_opt, annex_groupwanted_opt, annex_wanted_opt, as_common_datasrc, inherit_opt, publish_by_default, publish_depends, recursion_flag, recursion_limit
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.constraints import EnsureBool, EnsureChoice, EnsureNone, EnsureStr
  from datalad.support.exceptions import CapturedException, InsufficientArgumentsError, MissingExternalDependency
  from datalad.support.external_versions import external_versions
  from datalad.support.network import RI, PathRI, is_ssh
  from datalad.support.param import Parameter
  from datalad.ui import ui
  from datalad.utils import _path_, ensure_list, make_tempfile, on_windows
  from datalad.utils import quote_cmdlinearg
  from datalad.utils import slash_join
label_desc: Use image node_id 3 for calling the CreateSibling obj's underlying member method code with example usage: obj._get_ds_remote_shared_setting(ds, name, ssh) and returns: shared