作曲家更新“中间人攻击”错误 [英] Composer Update "man-in-the-middle attack" error
问题描述
我克隆了一个本地项目并执行了 composer更新
,但出现了一些错误:
I cloned one of my local project and executed composer update
but I am getting some error:
[Composer\Repository\RepositorySecurityException]
http://packagist.org/p/friendsofsymfony/facebook-bundle $ f1d8c88e21c3636c7d6d8d66f3e98ce2c83de942d1ab652f76e8c4f82e2c6363.js
不匹配其签名。这应该表明是
的中间人攻击。尝试再次运行作曲家,如果您认为这是个错误,请报告此
。
[Composer\Repository\RepositorySecurityException]
The contents of http://packagist.org/p/friendsofsymfony/facebook-bundle$f1d8c88e21c3636c7d6d8d66f3e98ce2c83de942d1ab652f76e8c4f82e2c6363.js on do not match its signature. This should indicate a man-in-the-middle attack. Try running composer again and report this if you think it is a mistake.
我也试图清除作曲家缓存,但是没事。
I also tried to clear composer cache but nothing is working.
有人可以给我一个解决问题的想法,以便对我有所帮助。
Could someone give me an idea behind the issue so that it could be helpful for me.
Composer版本:b482ebe0ca18321d9322bd913af73c1c55adebf1
Composer Version: b482ebe0ca18321d9322bd913af73c1c55adebf1
推荐答案
在我的方案中,将以下几行添加到 composer.json
解决了该问题。
In my scenario, adding the following lines to composer.json
fixed the issue.
"repositories": {
"packagist": { "url": "https://packagist.org", "type": "composer" }
}
编辑
如果您有一个以上的存储库:
Edit
If you have more then one repository:
"repositories": [
{ "type": "composer", "url": "https://packagist.org" },
{ "type": "git", "url": "git@bitbucket.org:repo_name/proj_name.git" }
],
这篇关于作曲家更新“中间人攻击”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!