In an attempt to simplify my setup, I have been trying to setup an encrypted repository on a rsyncd
-based server via git-remote-gcrypt
, which would house the file history and the annexed files themselves. I cannot provide an SSH connection to the server, so the rsyncd
method seemed appealing.
Using the rsync format url with "::" to signal the rsyncd method, the connection seems successful, but the initialization does not complete.
git annex initremote gcrypt-rsyncd type=gcrypt gitrepo=rsync://***::a/test keyid=*** encryption=hybrid
initremote gcrypt-rsyncd (encryption setup) (to gpg keys: ***) gcrypt
Decrypting manifest
gpg: Signature made Wed Nov 22 22:23:16 2023 CET
gpg: using EDDSA key ***
gpg: Good signature from "archive-990" [ultimate]
gcrypt: Remote ID is :id:ya5ZivzWNEOUtVg2R0L9
From gcrypt::rsync://***::a/test
* [new branch] git-annex -> gcrypt-rsyncd/git-annex
gcrypt: Decrypting manifest
gpg: Signature made Wed Nov 22 22:23:16 2023 CET
gpg: using EDDSA key ***
gpg: Good signature from "archive-990" [ultimate]
Everything up-to-date
git-annex: git: createProcess: chdir: invalid argument (Bad file descriptor)
failed
initremote: 1 failed
Logs from the daemon show the following error:
rsync to a/test/annex/objects from ***
I don't know whether this error is imputable to git-annex
, or git-remote-gcrypt
, or my settings.
That is a pretty weird error message! It looks like git-annex may have run git but tried to pass it a working directory that does not exist. It would be interesting to know what git command, passing --debug would tell you.
But: The gcrypt special remote is documented as needing gitrepo=rsync:// to operate over ssh. And git-remote-gcrypt interprets a rsync:// url as rsync over ssh (see its man page). Yes, "host::" in rsync indicates direct contact to a rsync daemon, not using ssh, but that will not work with git-remote-gcrypt to the best of my knowledge.
There is no specific log to highlight when running the command in
--debug
.I ended up refactoring my systems to allow the use of SSH, which seems to be the supported method, and to avoid any further issue down the line.