git annex/ssh:ControlPath太长 [英] git annex / ssh : ControlPath too long
问题描述
在运行命令:git annex sync时,出现以下错误:
when running the command : git annex sync, I get the following error:
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
根据此,问题不是git而是ssh(但在那里提出的解决方案无效).
according to this , the issue is not git but ssh (but the solution proposed there did not work).
有什么我可以避免的问题?
Anything I could to to avoid this issue ?
推荐答案
"-S","<local path to git repo>/.git/annex/ssh/git@<git url>"
此路径的长度不应超过92个字符,例如 unix(7)建议:
This path shouldn't be longer then 92 characters, as unix(7) proposes:
在编写可移植应用程序时,请记住一些 实现中的sun_path短至92个字节.
When coding portable applications, keep in mind that some implementations have sun_path as short as 92 bytes.
If you know you dive too deep in the directory structure and the path will extend this limit, you can do one of these things, based on man git-anex in your .git/config
:
-
使用
annex.sshcaching=off
完全关闭连接共享. 警告:这将大大增加执行所有操作所需的时间和资源!
Turn off connection sharing completely using
annex.sshcaching=off
. Warning: This will significantly increase the time and resources that are required to do all operations!
使用annex.ssh-options="-S=~/.ssh/control-%l.%r@%h:%p" -oControlMaster=auto
这篇关于git annex/ssh:ControlPath太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!