git clone 失败问题

git clone 失败问题

1、问题现象

今天在使用git下载qemu源代码的时候, git clone git://git.qemu.org/qemu.git 总是提示

Cloning into ‘qemu’…
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.

这里写图片描述

2、问题分析

此问题断断续续解决了两天, 并且再次确认github以及本地git配置都是正确的, 始终没找到真正的解决办法,倍感郁闷。
今天在https://stackoverflow.com/questions/32238616/git-push-fatal-origin-does-not-appear-to-be-a-git-repository-fatal-could-n上偶然看到一个方法, 使用git remote -v 来 check that your origin is set by running。 在git clone环境下输入git remove -v,打印如下:

kitty@kitty-virtual-machine:/mnt/hgfs/Linux/GIT$ git remote -v
fatal: Not a git repository (or any parent up to mount point /mnt/hgfs)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

这里写图片描述

这个提示很明显, fatal: Not a git repository (or any parent up to mount point /mnt/hgfs) 。

我的git clone是在虚拟机上运行的, /mng/hgfs 是我挂载在虚拟机上的一个外接硬盘, 在/mng/hgfs 下执行git clone居然会失败!

3、解决办法

切换到~/Document下,再次 执行git clone git://git.qemu.org/qemu.git,成功执行。
这里写图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值