我正在尝试使用avahi在本地networking上执行git remotes:
git clone ssh://[email protected]:test.git
Git抱怨:
ssh: Could not resolve hostname west.local:: Name or service not known
然而,我可以west.local向west.local 。 定期查找成功:
$ host west.local west.local has address 208.68.139.38 Host west.local not found: 3(NXDOMAIN)
万一它很重要,我运行Ubuntu 10.04,而west.local是使用Bonjour的OS X机器。
我怎样才能让git与west.local交谈,而不是在/etc/resolv.conf (这破坏了zeroconf的要点)中硬编码的东西?
这看起来像一个URL语法问题。 如果要使用远程计算机上相对于主目录的存储库path,请使用以下forms之一:
git clone ssh://[email protected]/~/test.git git clone [email protected]:test.git
在完整的ssh://表单中混合它们并在主机名后面使用':'不起作用。
我没有零configuration的实际经验。 如何创build一个别名?
alias gitclone="git clone ssh://josh@$(host west.local | awk {'print $NF'}):test.git"