当前位置:   article > 正文

Harmony项目ohpm报错_the registry is empty - edit .ohpmrc file or use "

the registry is empty - edit .ohpmrc file or use "ohpm config set registry y

1、创建项目报错

Harmony创建FA模型的项目时报如下错:

The registry is empty - edit .ohpmrc file or use "ohpm config set registry your_registry" command to set registry.
  • 1

解决方法:
File -> Settings -> Build,Execution,Deployment -> Ohpm 配置ohpm仓库,地址如下:

https://repo.harmonyos.com/ohpm/
  • 1

在这里插入图片描述

2、下载以来报错

下载依赖的试试报错:

ohpm ERROR: SELF_SIGNED_CERT_IN_CHAIN request to https://repo.harmonyos.com/ohpm/xxx failed, reason: self signed certificate in certificate chain

ohpm ERROR: Install failed  request to https://repo.harmonyos.com/ohpm/xxx failed, reason: self signed certificate in certificate chain
  • 1
  • 2
  • 3

该问题可能是校验registry证书时出现问题。
在这里插入图片描述
解决方法:
进入C:/Users/用户名目录/.ohpm,打开.ohpmrc文件,添加如下配置

strict_ssl=false //屏蔽证书校验
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/125147
推荐阅读
  

闽ICP备14008679号