Buyers
Composer setup
Add Packagento to Composer and install a licensed package.
Add the Packagento Composer repository
Run this once per project, from your project root:
composer config repositories.packagento composer https://packagento.com
That writes a repositories block into composer.json. You only need to do this the first time.
Generate a project token
Sign in to your Packagento account, head to Projects & Tokens
, create a project for your install (e.g. "production", "staging"), then create a token. The private key is revealed inline once, right after you create it. If you miss it, use the Download auth.json link on the token row to fetch the credentials again.
Save the token in auth.json
Composer reads HTTP Basic auth from ~/.composer/auth.json (global) or ./auth.json (project). For CI, prefer the project-level file with the token in your secret store and auth.json written at build time.
{
"http-basic": {
"packagento.com": {
"username": "<public_key>",
"password": "<private_key>"
}
}
}
The username is the public_key shown next to the token; the password is the private_key. Both are random hex strings.
Purchase a license + install
Browse the registry, purchase a license for the package you need, then activate it against the project you just created. Now composer require works:
composer require vendor/package
Composer fetches the package the same way it fetches anything else. No plugins required, no special flags.
Troubleshooting
- 401 Unauthorized: the username and password in auth.json did not match a valid token. The token may have been rotated or revoked. See API tokens.
- 404 on /p2/vendor/package.json: the token has no active license for this package. Activate the license against the project the token belongs to.
- Slow first install: the first /dist/ request for a tag streams the archive from origin storage. Composer caches the file locally, so repeated installs of the same tag on the same host are typically fast.