Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

(PHP) Composer and private repositories: how to?

Atlassing can't tell me this (tried support but they can't tell me, because of lack of experience), but they pointed me to this form, which I've search for an hour.


BTW: I'm not looking for a Satis solution, because it is another process running on everybodies computer. I'm looking for a direct solution.

We have private repositories that are in use in other private repositories.
So we want composer (php package manager) to get a repository (even when it is private)

But somehow I get errors like:
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package our_vendor/our_private_package could not be found in any version, there may be a typo in the package name.

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <> for more details.
- It's a private package and you forgot to add a custom repository to find it

  • I am pretty sure there is no typo, since I can git clone it and that works.
  • I can get the dev branch
  • When I do composer update -vvv, I can see it clones the correct repository
    • also after a composer clearcache

To show that I have/did/tried:

I have a dev-branch on a private repository

"type": "git",
"url": ""
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"our_vendor/our_private_package": "*@dev"

I tried:

  • setting up oauth in a auth.json (in a .composer directory)
    • with a consumer key/sxecret that is under my account 
    • unclear how composer would use this
  • setting up oauth in the config part of composer (with the same result)
  • composer self update
"config": {
"bitbucket-oauth": {
"": {
"consumer-key": "my_key",
"consumer-secret": "my_secret"

I tried to change the requirements

"require": {
"our_vendor/our_private_package": "dev-dev as 1.0.0"

or into

"require": {
"our_vendor/our_private_package": "dev-dev"

or into

"require": {
"our_vendor/our_private_package": "*"

I tried to add the branch to the repository:

"type": "vcs",
"url": "",
"branch": "dev"

So I tried a lot of things, but without success.

The only thing that works, is to have the repositories point out to a local (git cloned) version of the private repository (the same way Satis does it), but this should not be the end solution.


2 answers

I've also tried many settings in composer.json, and it took some time to figure out the correct way to do it.

Side note: I'm using a private Gitlab repo here, not sure if it applies to bitbucket as well.


This is what works (at least) for me:

"repositories": [
"type": "git",
"url": "git@my-gitlab-server:ivo/my-package.git"
"require": {
"ivo/my-package": "*"
"minimum-stability": "dev"

Good luck and let me know if it worked for you please!

Thanks for this! They key for me was using dev-master because the package is brand new and not yet versioned. Is just a single master line.

"org/package": "dev-master"

Glad you found a solution!

Thanks for the update!

I don't suppose you'd be able to share a full configuration? I am having trouble getting this working and I feel as though I have tried all combinations of config!


Some things to note:

- Using composers auth.json

- Targeting the master branch using "dev-master"

- Using the https URL as suggested by composers documentation


The error I am currently receiving is "fatal: repository '{VENDOR}/{REPO}.git' does not exist" but I have receive various error depending on the composer.json I use.


Any help would be awesome!


Sure, the new pieces to make it work are just in the parent projects composer.json

"bitbucket-oauth": {
 "": {
  "consumer-key": "key-name-goes-here",
  "consumer-secret": "ssh-rsa..."
"repositories" : [
"type": "vcs",
"url": ""
"require": {
"DOMAIN/REPO": "dev-master"


Also in the child library projects composer.json I added this because we don't have real usage of branches/tags (yet), so pulling from master is fine

"extra": {
"branch-alias": {
"dev-master": "master"

Note that the repository you are requiring should also have its own composer.json, the name set for the package there must match the name of the package you are including (vendor/projectname in my example above).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

486 views 10 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you