Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 678
panthro Avatar asked Jun 24 '14 11:06

panthro


People also ask

Can I create a private NPM package?

With npm private packages, you can use the npm registry to host code that is only visible to you and chosen collaborators, allowing you to manage and use private code alongside public code in your projects. Private packages always have a scope, and scoped packages are private by default.

What is a private package?

1): Packages that are not exported or imported are called private packages.

How do I make a GitHub package private?

Perhaps the first step in making your package private is to make your package's repository private. To make your Github repository private, click on the Settings tab, scroll to the bottom and then click on Change repository visibility. Only do this if your repository isn't already private.


1 Answers

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

like image 163
Tom Avatar answered Sep 17 '22 11:09

Tom