首页 > 解决方案 > 无法从已安装的驱动器克隆存储库

问题描述

我正在使用适用于 Linux 的 Windows 子系统 (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。谢谢你。

标签: linuxgitubuntugithubwindows-subsystem-for-linux

解决方案


考虑对Chmod/Chown WSL Improvements的更改,您可以尝试,如WSL 问题 3172

sudo umount /mnt/d
sudo mount -t drvfs D: /mnt/d -o metadata

推荐阅读