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

    xiaoxiao2022-06-28  28

    一、异常: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

        

    转载请注明原文地址: https://ju.6miu.com/read-1124275.html

    最新回复(0)