得到“没有这样的远程或远程组".尝试在Composer中使用私人存储库时发生错误 [英] Getting a "No such remote or remote group" error when trying to use a private repo in Composer
问题描述
尝试运行作曲器时出现错误.我的composer.json
中有以下内容:
I'm getting an error when I try to run composer. I have the following in my composer.json
:
{
"require": {
"my/private-repo": "dev-development"
},
"repositories": [
{
"type": "git",
"url": "git@bitbucket.org:my/private-repo.git"
}
],
}
在该私有bitbucket存储库中,有一个名为"my/private-repo"的composer.json,还有一个名为development的分支.
In that private bitbucket repo, there's a composer.json with a name of "my/private-repo", and there's a branch called development.
当我尝试运行composer时,出现以下错误:无法更新git@bitbucket.org:my/private-repo.git,此存储库中的软件包信息可能已过时(致命:没有这样的远程或远程组:"origin".我根本不知道为什么要提到起源;我已经在这个作曲家的完全独立的文件夹中找到了该私有仓库,所以它不应该在那儿查找.我可以git clone my/private-repo很好,所以这不是SSH问题.有什么想法吗?
When I try to run composer, I get this error: "Failed to update git@bitbucket.org:my/private-repo.git, package information from this repository may be outdated (fatal: No such remote or remote group: origin". I have no idea why it's mentioning origin at all; I've got that private repo in a totally separate folder on this composer, so it shouldn't be looking in there. I can git clone my/private-repo just fine, so it's not an SSH issue. Any ideas?
推荐答案
因此,事实证明这只是Composer缓存的问题.我运行rm -rf ~/.composer/cache/
并尝试再次更新,一切正常.
So it turns out this was just an issue with Composer caching. I ran rm -rf ~/.composer/cache/
and tried updating again, and everything works.
这篇关于得到“没有这样的远程或远程组".尝试在Composer中使用私人存储库时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!