Getting a “No such remote or remote group” error w

2019-08-10 15:42发布

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"
        }
    ],
}

In that private bitbucket repo, there's a composer.json with a name of "my/private-repo", and there's a branch called development.

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?

2条回答
混吃等死
2楼-- · 2019-08-10 16:16

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.

查看更多
Animai°情兽
3楼-- · 2019-08-10 16:20

I also had this problem but it was caused because of something I did. I have two projects setup. One was a dependency on the other. I used composer to manage this dependency. For testing purposes, I deleted the dependency from vendor/namespace/my-lib and created a symlink to the other project. Then I could update code on the fly and commit when I was done. When I later tried to do a composer update I received the error above.

To resolve the problem I deleted my symlink and then ran composer update. It properly downloaded the dependency and everything was fine.

查看更多
登录 后发表回答