panthro
panthro

Reputation: 24059

Create a private package?

I'm creating a package but I would like to keep it private so only members of my dev team can use it.

I've checked this out on Google and Satis came back as an option.

I was just wondering do I need to use Satis to keep my package private or is there another way? Would a private repo on Git hub do the job?

Upvotes: 5

Views: 11094

Answers (1)

Tom
Tom

Reputation: 612

Yes you can use a Github private repo. I assume your intention is to use this package via composer. Simply add the below code to your composer file and replace the key values with your vendor/package name and the URL to the repository.

{
"require": {
    "vendor/my-private-repo": "dev-master"
},
"repositories": [
    {
        "type": "vcs",
        "url":  "github.org/vendor/my-private-repo.git"
    }
]
}

Here is the reference to the composer documentation on private repos:

https://getcomposer.org/doc/05-repositories.md#vcs

Upvotes: 10

Related Questions