我使用AWS扩容,当我将响应代码推到我的分支时,CI/CD运行,在"npm安装“上,在AWS扩容上构建失败,有错误
NPM2022-01-11T09:31:06.876Z警告:错误!执行时出错: npm ERR!/usr/bin/git ls-远程-h -t git://github.com/danteata/passyp-oauth.gitnmerr!npm错误!致命:远程错误: npm错误!端口9418上未经身份验证的git协议不再受支持。npm错误!有关更多信息,请参见https://github.blog/2021-09-01-improving-git-protocol-security-github/。npm错误!npm错误!与错误代码一起退出: 128
我还试图复制git://git。用https://git...。在Packe-lock.json(由https://github.blog/2021-09-01-improving-git-protocol-security-github/建议)中,但是构建失败时也有相同的错误。
发布于 2022-02-25 07:44:35
通过将git config --global url."https://".insteadOf git://
添加到构建规范amplify.yml preBuild逗号(就在npm install
之前),我们克服了这一点。
见下文:
amplify.yml
...
frontend:
phases:
preBuild:
commands:
- git config --global url."https://".insteadOf git://
- npm install
...
https://stackoverflow.com/questions/70669610
复制相似问题