Composer Setup
This guide explains how to configure your project to pull packages from an Onsynk organization registry.
Prerequisites
- Composer 2.x installed
- An active license from the organization (visit your Dashboard to find your token)
Step 1 — Add the Repository
Add the organization's registry to your composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://{org-slug}.onsynk.com"
}
]
}
Replace {org-slug} with the organization's slug (e.g. acme).
Step 2 — Add Your Token
Create or update auth.json in your project root. This file should not be committed to version control.
{
"bearer": {
"{org-slug}.onsynk.com": "your-access-token"
}
}
You can copy your token from the Dashboard.
Tip: Add
auth.jsonto your.gitignoreto keep your token safe.
Step 3 — Require the Package
composer require vendor/package-name
Composer will authenticate automatically using the Bearer token.
Troubleshooting
| Error | Cause | Fix |
|-------|-------|-----|
| Could not find package | Wrong registry URL or package not public | Check the org slug and package visibility |
| HTTP 401 Unauthorized | Invalid or missing token | Verify your auth.json token |
| HTTP 403 Forbidden | License suspended or expired | Contact the organization |