我有类似的东西
"repositories": [ { "type": "package", "package": { "name": "myrepo", "version": "dev-master", "source": { "url": "https://github.com/me/myrepo.git", "type": "git", "reference": "master" } } },
但是当Composer拉出回购时,遥控器(origin
和composer
)就会.git/config
被设置为git://github.com/me/myrepo.git
.
[remote "origin"] url = git://github.com/me/myrepo.git fetch = +refs/heads/*:refs/remotes/origin/* pushurl = git@github.com:me/myrepo.git [branch "master"] remote = composer merge = refs/heads/master [remote "composer"] url = git://github.com/me/myrepo.git fetch = +refs/heads/*:refs/remotes/composer/*
我无法推动它,因为Github无法使用git://
.我必须手动将其更改为https://
然后推送.我https://
在URL中指定了,但为什么这不受尊重?
您可以使用以下命令更改用于github的协议:
composer config --global github-protocols https
然后重新安装供应商应该做你想要的.