PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 29, 2022

[FIXED] Getting a "No such remote or remote group" error when trying to use a private repo in Composer

 January 29, 2022     bitbucket, composer-php, php     No comments   

Issue

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?


Solution

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.



Answered By - greggilbert
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing