Git
SSHFS 上的 Git 儲存庫:無法附加到“.git/logs/HEAD”:參數無效
這是我的錯誤:
fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Invalid argument
Etckeeper 一直工作到今天。最近對系統的唯一更改是上游 git 儲存庫。該
.git
目錄現在位於 sshfs 掛載上。我現在明白這與問題有關。當 .git 目錄從 NFS 掛載切換到 sshfs 掛載時,問題就開始了。給出錯誤的命令的完整輸出:
[root@pc2 etc]# pacman -R cowsay checking dependencies... Packages (1) cowsay-3.03-9 Total Removed Size: 0.03 MiB :: Running pre-transaction hooks... (1/3) Performing snapper pre snapshots for the following configurations... ==> root: 182 (2/3) Etckeeper Pre-install (3/3) Update git tracked list of installed packages fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Invalid argument error: command failed to execute correctly :: Processing package changes... (1/1) removing cowsay [#################################################################] 100% :: Running post-transaction hooks... (1/4) Etckeeper Post-install (2/4) Update git tracked list of installed packages fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Invalid argument error: command failed to execute correctly (3/4) Arming ConditionNeedsUpdate... (4/4) Performing snapper post snapshots for the following configurations... ==> root: 183
請建議下一步。
當您使用
sshfs
掛載目錄時,還要指定-o writeback_cache=no
:sshfs -o writeback_cache=no [user@]host:/dir/ /localdir
有關更多資訊,請參見https://github.com/libfuse/sshfs/issues/82。