Linux Can';t从装载的驱动器克隆存储库

Linux Can';t从装载的驱动器克隆存储库,linux,git,ubuntu,github,windows-subsystem-for-linux,Linux,Git,Ubuntu,Github,Windows Subsystem For Linux,我使用的是Windows Linux子系统(WSL),并且有一个挂载的microSD卡,我过去可以将存储库克隆到其中。然而,最近我在尝试从/mnt/d/克隆时收到此错误: Cloning into 'your_repo'... error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted error: chmod on /mnt/d/your_repo/.git/config.lock fail

我使用的是Windows Linux子系统(WSL),并且有一个挂载的microSD卡,我过去可以将存储库克隆到其中。然而,最近我在尝试从
/mnt/d/
克隆时收到此错误:

Cloning into 'your_repo'...
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
如果我切换到
/mnt/c/
上的任何目录,我可以很好地克隆。克隆时,如果有帮助的话,我会使用SSH。谢谢。

考虑到对的更改,您可以尝试,如中所示


我在新安装的WSL Unbuntu上看到了这个错误。我当然不能
sudoumount/mnt/c
,但是重启后一切都很好

SD卡有一些问题。尝试使用HDD或SSD。链接:太好了!工作得很好,工作得很有魅力。谢谢如何使它永久化,这样我就不需要一次又一次地做,冯?Thx@xpt您应该能够将该命令放在
~/.bashrc
中,以便通过正确(自动)安装该驱动器来启动shell会话。
sudo umount /mnt/d
sudo mount -t drvfs D: /mnt/d -o metadata