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?
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.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 acomposer 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.