On one of my ssh remotes I had to install git-annex using cabal. No system-wide installation possible. Hence git-annex and git-annex-shell are not in the default $PATH but in $HOME/.cabal/bin.

Right now the command run by git-annex when ssh'ing to a remote is hardcoded to "git-annex-shell", which doesn't work for me. It would be nice to be able to change this per remote, for example with an option named annex.<remote>.annex-shell-command. Changing "git-annex-shell" in Remote/Helper/Ssh.hs to "~/.cabal/bin/git-annex-shell" worked for me, but it's obviously very ugly :)

Could you do that please? I'll try to hack it myself and send you a patch in the next few days, but I'm pretty new to Haskell so it may take me a while... Thanks!

closing, see comments --Joey

It doesn't need to be installed into the system PATH; just the user PATH. Which you should be able to control.

Exactly how to do this surely varies, but here I have a ~/.bashrc containing PATH=$HOME/bin:$PATH; export PATH and I keep git-annex-shell in bin and it's available to eg "ssh mybox git-annex-shell"

Comment by http://joey.kitenet.net/ Thu Mar 22 22:26:02 2012
Hmm, ok, solved. I'm using zsh, which is a little different: .zshrc is only read for interactive shells, so ssh mybox 'echo $PATH' displayed /usr/bin:/bin:/usr/sbin:/sbin. Using .zshenv, which is used even for non-interactive shells, did the trick. Thanks!
Comment by http://schnouki.net/ Fri Mar 23 13:27:12 2012
Comments on this page are closed.