我创建了一个 yeoman 生成器,我希望它可以作为节点模块安装。这是为了使安装自定义生成器成为团队中其他开发人员可以轻松完成的一步过程npm install git+https://path-to-local-git-server/generator-repo.git
。
我相信我已经正确设置了所有内容,但是 npm 会在自签名证书上发出以下错误
npm ERR! fatal: unable to access 'https://path-to-local-git-server/generator-repo.git': SSL certificate problem: self signed certificate
我试图让 npm 忽略证书警告,npm config set strict-ssl false
但npm config set ca=""
npm 仍然抱怨证书
请帮忙。另一种方法是让用户克隆 git repo 并使用他们的克隆路径进行 npm 安装,这不是那么理想,因为我想以他们可以使用 npm 更新的方式对生成器进行版本化和维护。