git annex / ssh : ControlPath too long

后端 未结 1 1748
慢半拍i
慢半拍i 2021-02-20 02:16

when running the command : git annex sync, I get the following error:

ControlPath too long
Command ssh [\"-S\",\"/.git/annex/ssh/gi         


        
相关标签:
1条回答
  • 2021-02-20 02:47
    "-S","<local path to git repo>/.git/annex/ssh/git@<git url>"
    

    This path shouldn't be longer then 92 characters, as unix(7) proposes:

    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:

    1. 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!

    2. Specify your own path for shared connections, using annex.ssh-options="-S=~/.ssh/control-%l.%r@%h:%p" -oControlMaster=auto

    0 讨论(0)
提交回复
热议问题