Versioning Radicale data with git?
-
The Radicale documentation describes how to use git to track changes to its calendars and address books. I realize that using this functionality would require forking the Cloudron Radicale app so that I could modify the config file, but my use case is actually somewhat different. Instead, I was hoping to use the Radicale app's
cron
settings to periodically run agit pull
for changes made elsewhere, overwriting changes made by my WebDAV clients.In either case, I need a git repository initialized inside Radicale's data folder. I ran
git init
in/app/data/collections
in the container, but subsequent commands fail with this error:root@[app id]:/app/data/collections# git status fatal: detected dubious ownership in repository at '/app/data/collections' To add an exception for this directory, call: git config --global --add safe.directory /app/data/collections root@[app id]:/app/data/collections# git config --global --add safe.directory /app/data/collections error: could not lock config file /root/.gitconfig: Read-only file system root@[app id]:/app/data/collections# git config --system --add safe.directory /app/data/collections error: could not lock config file /etc/gitconfig: Read-only file system
I don't really want to start messing with file permissions anywhere, but then this fails too, even though it is definitely a git repository:
root@[app id]:/app/data/collections# git config --local -l fatal: --local can only be used inside a git repository
Setting the flag just for that one command doesn't work either:
root@[app id]:/app/data/collections# git -c safe.directory=/app/data/collections status fatal: detected dubious ownership in repository at '/app/data/collections' To add an exception for this directory, call: git config --global --add safe.directory /app/data/collections
I was able to get everything working by logging into the host :
root@[host]:/# cd /home/yellowtent/appsdata/[app id]/data/collections root@[host]:/home/yellowtent/appsdata/[app id]/data/collections# git status On branch main Untracked files: (use "git add <file>..." to include in what will be committed) [collection id] nothing added to commit but untracked files present (use "git add" to track)
So I think I have a path forward, even though it's less than ideal. I'm just starting out with Cloudron though — is there anything I'm missing?