我有這樣的事情如何強制Composer使用https://而不是git://?
"repositories": [
{
"type": "package",
"package": {
"name": "myrepo",
"version": "dev-master",
"source": {
"url": "https://github.com/me/myrepo.git",
"type": "git",
"reference": "master"
}
}
},
但當作曲拉回購,在.git/config
的遙控器(origin
和composer
)被設置爲git://github.com/me/myrepo.git
。
[remote "origin"]
url = git://github.com/me/myrepo.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = [email protected]: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://
,然後按。我在URL中指定了https://
,但爲什麼這不被尊重?
在Zend Framework 2上,命令是'php composer.phar config --global github-protocols https' – KalenGi
@KalenGi:這是同樣的事情,但是您使用的是本地安裝的'composer'可執行文件。 phar'擴展添加。 – iconoclast
@Seldaek:這項工作適用於GitHub以外的網站嗎?例如:git.code.sf.net? – iconoclast