support being run by ssh as ssh-askpass replacement
To use, set GIT_ANNEX_SSHASKPASS to point to a fifo or regular file (FIFO is better, avoids touching disk or multiple readers) that contains the password. Then set SSH_ASKPASS=git-annex, and when ssh runs it, it will tell ssh the password. This is not yet used..
This commit is contained in:
parent
ac98853f05
commit
79cf404e75
3 changed files with 22 additions and 5 deletions
|
@ -199,5 +199,11 @@ run args = do
|
|||
#ifdef WITH_EKG
|
||||
_ <- forkServer "localhost" 4242
|
||||
#endif
|
||||
maybe (dispatch True args cmds gitAnnexOptions [] header Git.CurrentRepo.get)
|
||||
(runSshCaching args) =<< getEnv sshCachingEnv
|
||||
go envmodes
|
||||
where
|
||||
go [] = dispatch True args cmds gitAnnexOptions [] header Git.CurrentRepo.get
|
||||
go ((v, a):rest) = maybe (go rest) a =<< getEnv v
|
||||
envmodes =
|
||||
[ (sshCachingEnv, runSshCaching args)
|
||||
, (sshAskPassEnv, runSshAskPass)
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue