【问题标题】:Issues setting "git init" on windows sub system在 Windows 子系统上设置“git init”的问题
【发布时间】:2020-08-19 14:23:57
【问题描述】:

运行 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!

没有分辨率 -

有什么建议吗?谢谢

【问题讨论】:

    标签: ubuntu windows-subsystem-for-linux git-push


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-27
      • 1970-01-01
      相关资源
      最近更新 更多