无法进行git克隆

4
我想使用以下命令克隆代码库。
 git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

我发现这个命令出现了以下错误。
dev@ubuntu:/a/WebRtc/Tools$ 
dev@ubuntu:/a/WebRtc/Tools$git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Cloning into 'depot_tools'...
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.
dev@ubuntu:/a/WebRtc/Tools$

这是截图的链接

我尝试了以下几种方法:

  • 更新git版本。
  • 尝试使用Ubuntu 15.10和14.04.4。
  • 在Windows机器上尝试相同的命令,它可以工作。

尝试不使用sudo进行克隆。 - CodeWizard
谢谢您的评论。我已经尝试了,但仍然无法工作。 - dileepa dharmasiri
你能在这台机器上使用浏览器(lynx / links)浏览https://chromium.googlesource.com/chromium/tools/depot_tools.git吗? - DevilaN
2
你尝试过不带结尾的 .git 吗?git clone https://chromium.googlesource.com/chromium/tools/depot_tools - CodeWizard
1个回答

0

克隆(不是推送或拉取)期间出现这样的错误消息表明git无法正确创建本地repo。
例如,参见“无法将git克隆到VMWare共享文件夹”,其中无法创建硬链接是有问题的。

请检查:

  • 如果您的用户有创建文件/符号链接/硬链接的权限,或者
  • 如果有某种apparmor策略会阻止/限制在您的设置中创建文件,或者
  • 如果/a/WebRTC是具有受限权限的已挂载文件夹

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接