无法初始化存储库(映射的网络驱动器)



我有一个映射的网络位置"E:foldersubfolder"我有我的项目,我想同步到github.

在VS code中,

  • 点击"初始化存储库",
  • 命令行询问一个文件夹,
  • 预设是好的(虽然手动浏览是一样的)
  • 什么也不会发生

执行相同的过程C:foldersubfolder": works just fine.

如何解决这个问题?

我尝试设置权限(这已经很好了,但也尝试了"完全控制")。(映射驱动器"E"是一个NAS文件夹)

2022-11-06 19:15:18.574 [info] Validating found git in: C:Program FilesGitcmdgit.exe
2022-11-06 19:15:18.607 [info] Using git 2.38.1.windows.1 from C:Program FilesGitcmdgit.exe
2022-11-06 19:15:18.696 [info] > git rev-parse --show-toplevel [83ms]
2022-11-06 19:15:18.696 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
2022-11-06 19:15:18.746 [info] > git rev-parse --show-toplevel [46ms]
2022-11-06 19:15:18.746 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
2022-11-06 19:15:18.799 [info] > git rev-parse --show-toplevel [50ms]
2022-11-06 19:15:18.800 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
2022-11-06 19:15:18.833 [info] > git rev-parse --show-toplevel [31ms]
2022-11-06 19:15:18.833 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
2022-11-06 19:15:18.886 [info] > git rev-parse --show-toplevel [50ms]
2022-11-06 19:15:18.886 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
2022-11-06 19:15:18.963 [info] > git rev-parse --show-toplevel [41ms]
2022-11-06 19:15:18.963 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle'
2022-11-06 19:15:53.100 [info] > git rev-parse --show-toplevel [108ms]
2022-11-06 19:15:53.100 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
2022-11-06 19:16:19.893 [info] > git rev-parse --show-toplevel [46ms]
2022-11-06 19:16:19.893 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
2022-11-06 19:16:34.246 [info] > git rev-parse --show-toplevel [47ms]
2022-11-06 19:16:34.246 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
2022-11-06 19:16:40.597 [info] > git rev-parse --show-toplevel [90ms]
2022-11-06 19:16:40.597 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
2022-11-06 19:16:40.633 [info] > git rev-parse --show-toplevel [33ms]
2022-11-06 19:16:40.633 [info] fatal: detected dubious ownership in repository at '//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'
'//192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension' is owned by:
    'S-1-5-21-2272522387-2785212326-2585521355-3048'
but the current user is:
    'S-1-5-21-3398360568-3200424794-839922802-1001'
To add an exception for this directory, call:
    git config --global --add safe.directory '%(prefix)///192.168.2.151/Google Drive __ pyfiddle/github test/py_fiddle/pyfiddle.extension'

让我们看看你的git日志:

  • Type Ctrl + Maj + P(与此同时),一个字体框打开
  • Terminal: Focus on Terminal View
  • 转到Output选项卡
  • 在下拉列表中选择Git

复制粘贴内容

最新更新