在WDCloud NAS上克隆git存储库失败/ git init失败



我试图在我办公室的WDCloud上创建我的github文件的本地存储库。PC运行Ubuntu 20.04

  1. 尝试使用git clone https://github.com/ZZZ/XXX克隆失败,因此尝试使用sudo git clone https://github.com/ZZZ/XXX并得到此错误

  2. 当然,git的repo可以根据需要在同一台PC上的本地驱动器上工作。

  3. guy@cloud为NAS目录链接。

:

guy@desktop:~/guy@cloud/git2$ sudo git clone https://github.com/ZZZ/XXX
[sudo] password for guy: 
Cloning into 'Arduino'...
remote: Enumerating objects: 8646, done.
remote: Counting objects: 100% (8646/8646), done.
remote: Compressing objects: 100% (4145/4145), done.
remote: Total 24775 (delta 4906), reused 6922 (delta 3869), pack-reused 16129
Receiving objects: 100% (24775/24775), 43.12 MiB | 10.31 MiB/s, done.
Resolving deltas: 100% (13500/13500), done.
fatal: cannot create directory at 'libraries/Adafruit_GFX_Library': Interrupted system call
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
guy@desktop:~/guy@cloud/git2$ git status
fatal: not a git repository (or any parent up to mount point /home/guy)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
guy@desktop:~/guy@cloud/git2$ git restore --source=HEAD :/
fatal: not a git repository (or any parent up to mount point /home/guy)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
guy@desktop:~/guy@cloud/git2$ 

** EDIT 1:添加一个分叉的git(不是我的),仍然是相同的行为**

guy@desktop:~/guy@cloud/git3$ sudo git clone https://github.com/ZZZ/Low-Power
Cloning into 'Low-Power'...
remote: Enumerating objects: 125, done.
remote: Total 125 (delta 0), reused 0 (delta 0), pack-reused 125
Receiving objects: 100% (125/125), 41.64 KiB | 278.00 KiB/s, done.
Resolving deltas: 100% (54/54), done.
guy@desktop:~/guy@cloud/git3$ git status
fatal: not a git repository (or any parent up to mount point /home/guy)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
guy@desktop:~/guy@cloud/git3$ 

**编辑2:即使尝试git init**也会发生

guy@desktop:~/guy@cloud/git4$ git init
error: chmod on /home/guy/guy@cloud/git4/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'

This:

fatal: cannot create directory at
'libraries/Adafruit_GFX_Library': Interrupted system call

是问题的根源:一个试图创建目录的mkdir系统调用被中断了,几乎可以肯定是由Git的内部进度时钟计时器决定的,它决定何时打印诸如"30%完成"之类的东西。等等。

这个内部EINTR错误是不应该发生。操作系统应该重新启动mkdir系统调用(考虑到Git安排一切的方式)。您遇到了操作系统错误。不幸的是,Git还没有解决这个操作系统bug的方法。您需要做以下三件事之一:

  • 等待操作系统供应商修复错误。(这可能是一个漫长的等待。在这种情况下,它可能不是Linux内核本身,而是NAS导出的协议的附加组件。
  • 等待Git找到解决方法。这可能会在下一个Git版本中,因为它已经在进行中。
  • 为Git克隆Git存储库,构建并测试EINTR修复版本。这是解这道题最快的方法,但也是最费功夫的。好的一面是,你可以在下一个Git版本中得到你的名字。: -)

我认为这是你需要检查的问题:

fatal: cannot create directory at 'libraries/Adafruit_GFX_Library': Interrupted system call

检查写权限,或者克隆到其他位置

最新更新