【发布时间】:2011-08-05 20:52:26
【问题描述】:
假设我有以下 ssh .config 文件:
Host host_nickname
User xxx
HostName yyy.zz.vvv
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
如果您不熟悉 ControlMaster 或 ControlPath,以下是来自ssh_config manual 的描述:
ControlMaster:
Enables the sharing of multiple sessions over a single network
connection. When set to ``yes'', ssh(1) will listen for connec-
tions on a control socket specified using the ControlPath argu-
ment. Additional sessions can connect to this socket using the
same ControlPath with ControlMaster set to ``no'' (the default).
These sessions will try to reuse the master instance's network
connection rather than initiating new ones, but will fall back to
connecting normally if the control socket does not exist, or is
not listening.
在 Mercurial 中,如果您想从存储库推送或拉取,您只需键入以下内容:
hg push ssh://user@example.com/hg/
现在,我的问题:
我想请求 Mercurial 推送(或拉取)与我的 ssh 配置条目 host_nickname 对应的服务器上位于 /path/to/repository 的存储库。我该怎么做?
【问题讨论】: