window系统安装repo时遇到的问题

一、异常:fatal: cannot make .repoconfig-esrlabs directory

通过命令repo init安装repo

repo init

报异常:fatal: cannot make .repoconfig-esrlabs directory:


原因:这是文件的权限问题。我本地的用户id和所配置的用户id不同。由上面的控制台可以看到用户是zjhl,但是下面的环境变量配置HOME为zhhl,配置错了,造成了用户id的不同。


下面是repo种的截图


os.path.expanduser('~/.repoconfig-esrlabs')中的“~”获取的是变量HOME或者是USERPROFILE的值,可以通过下面的命令来查看配置是否正确。

echo $HOME
echo $USERPROFILE
解决方法:HOME的变量值配置正确





二、错误error: manifest missing or unreadable -- please run init

执行命令repo init时报

error: in `init`: [Errno 2] No such file or directory: 'D:/software/git/Git/.repo/manifests\\.git\\HEAD'
error: manifest missing or unreadable -- please run init



原因:当执行命令repo init -u https://android.googlesource.com/platform/manifest后获取文件失败,会在D:/soft/git/Git/.repo/目录下生成一个文件mainfests.git,如果该文件存在,再次运行会报该错误

解决方法:将目录文件夹D:/soft/git/Git/.repo/下的mainfests.git文件夹删除


三、异常:Failed to connect to android.googlesource.com port 443

执行命令repo init -u https://android.googlesource.com/platform/manifest时报



 Failed to connect to android.googlesource.com port 443: Timed out
fatal: unable to access 'https://android.googlesource.com/platform/manifest/': Failed to connect to android.googlesource.com port 443: Timed out
fatal: unable to access 'https://android.googlesource.com/platform/manifest/': Failed to connect to android.googlesource.com port 443: Timed out

原因:没有使用VPN或使用的VPN连接不上该网站

解决方法:换一个VPN


四、

执行命令repo init -u https://android.googlesource.com/platform/manifest后报 Not a git repository (or any of the parent directories): .git


Get https//android.googlesource.com/platform/manifest
▒▒û▒▒▒㹻▒▒Ȩ▒▒ִ▒д˲▒▒▒▒▒
▒▒û▒▒▒㹻▒▒Ȩ▒▒ִ▒д˲▒▒▒▒▒
fatal: 'https//android.googlesource.com/platform/manifest' does not appea a git repository
fatal: Could not read from remote repository.


Please make sure you have the correct access rights
and the repository exists.


原因:repo 依赖于git,所以需要先创建git仓库


解决办法:创建git仓库

1.初始化git:  git init

2.创建远程仓库:git remote add origin https://github.com/try-git/try_git.git




参考资料:https://github.com/kylemanna/docker-aosp/issues/9

    


  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值