gpt4 book ai didi

ubuntu - 在 Windows 子系统上设置 "git init"的问题

转载 作者:行者123 更新时间:2023-12-04 19:09:09 25 4
gpt4 key购买 nike

运行 linux 的子系统 - Ubuntu,当我尝试“git init”以开始推送到 github 时,出现以下错误

error: chmod on /mnt/c/Users/skywalker/dev/flatiron/projects/StarwarsCLI/.git/config.lock failed: 
Operation not permitted
fatal: could not set 'core.repositoryformatversion' to '0'

我被告知要跑
Open your Windows Defender Security Center
Go to Home
Click and open "Virus and Threat protection"
Click and open "Virus and threat Protection Setting"
Click and open "Manage Controlled folder access" in "Controlled folder access"option
Turn the "Controlled Folder access" OFF
Run "Git init" from cmd. DONE!

没有解决方案 -

有什么建议吗?谢谢

最佳答案

我遇到了这个问题,这对我有用:

sudo umount /mnt/c
sudo mount -t drvfs C: /mnt/c -o metadata

关于ubuntu - 在 Windows 子系统上设置 "git init"的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61604437/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com