Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
481 views
in Technique[技术] by (71.8m points)

composer更新了国内镜像,提交packagist的包不能install,怎么切换?

用的全局设置了国内镜像,虽然很快,但刚提交的包,却不能安装。

composer config -g repo.packagist composer https://packagist.phpcomposer...

提示:

Your requirements could not be resolved to an installable set of packages.

请问有什么方法在原始镜像和国内镜像之前来回切换?

我现在想设置回最初的国外镜像 怎么搞?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

composer config -g -e
其实就是修改config.json

{
    "repositories": [
        {   
            "packagist": false
        },  
        {   
            "type": "composer", 
            "url": "https://packagist.phpcomposer.com"
        }   
    ]
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...