Private Repositories

As well as installing dependencies from the public registry, yotta can install dependencies directly from GitHub URLs, including private github repositories.

Sometimes it may not be appropriate publish a module to the public package registry, some modules may contain the secret sauce that powers your product, some may be too early in development to release and some may be too specific to a project to be useful to anyone else. yotta supports several ways of integrating these modules into your project:

###Using yotta with GitHub repositories

yotta provides a shorthand way to specify that a dependency should be included from a GitHub repository:

...
"dependencies": {
"secretsauce": "username/reponame"
}
...

The shorthand GitHub URL is formed of two parts: <username>/<reponame> where <username> is the GitHub user or organisation name of the repository owner and <reponame> is the name of the repositiry. e.g. the yotta repositry can be found at ARMmbed/yotta.

You can specify a particular branch, tag or commit to use by providing it in the URL. The supported GitHub URL formats are:

If the GitHub repository is public, the dependency will simply be downloaded. If the GitHub repository is private and this is the first time you are downloading from a private GitHub repository, you will be prompted to log in to GitHub using a URL.

If you have a private GitHub repository and you would prefer to download it using SSH keys, you can use the following dependency form:

###Other ways to depend on private repositories
Using shorthand GitHub URLs is the easiest and recommended method of working with private repositories, however as not all projects are hosted on GitHub, yotta supports using git and hg URLs directly as well.

For example, to include a privately hosted git repository from example.com: