小工具知识网

当前位置: 首页 > 行业知识 > Harmony项目ohpm报错

行业知识

Harmony项目ohpm报错

2026-11-10 21:28:52 来源:互联网转载

1、创建项目报错

Harmony创建Findex.php/tags-41973.html" >A模型的项目时报如下错:

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

解决方法:

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

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

2、下载以来报错

下载依赖的试试报错:

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

该问题可能是校验registry证书时出现问题。

解决方法:

进入C:/Users/用户名目录/.ohpm,打开.ohpmrc文件,添加如下配置

strict_ssl=false //屏蔽证书校验

上一篇:华为OD机试C卷-- 德州扑克(Java & JS & Python)

下一篇:服务器dos模式怎么查看密码?