运行命令: gitannexsync 时,出现以下错误:
ControlPath too long
Command ssh ["-S","<local path to git repo>/.git/annex/ssh/git@<git url>","-o","ControlMaster=auto","-o","ControlPersist=yes","git@<git url>","git-annex-shell 'configlist' '<local path to git repo>'"] failed; exit code 255
根据this https://forums.openshift.com/solved-git-clone-or-other-git-command-exits-with-error-controlpath-too-long,问题不是 git 而是 ssh (但那里提出的解决方案不起作用)。
我可以做些什么来避免这个问题吗?
"-S","<local path to git repo>/.git/annex/ssh/git@<git url>"
此路径不应超过 92 个字符,如下所示unix(7) http://man7.org/linux/man-pages/man7/unix.7.html建议:
在编写便携式应用程序时,请记住一些
实现的 sun_path 短至 92 字节。
如果您知道您在目录结构中潜入太深并且路径将扩展此限制,您可以根据以下内容执行以下操作之一man git-anex https://git-annex.branchable.com/git-annex/在你的.git/config
:
使用完全关闭连接共享annex.sshcaching=off
. Warning:这将显着增加执行所有操作所需的时间和资源!
指定您自己的共享连接路径,使用annex.ssh-options="-S=~/.ssh/control-%l.%r@%h:%p" -oControlMaster=auto
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)