Page Contents

Overview

Bintray is a fully-fledged Debian repository and works seamlessly with the Debian client. You can use the Debian client to resolve packages from Bintray, and upload Debian packages using any compatible command line tool such as cURL.

Tip
To get code snippets formulated for your specific username and repository, use the Set Me Up button.

Downloading Files

To download files using Bintray’s REST API, please refer to Downloading Using APIs.

Resolving Debian Packages

You can resolve .deb packages from Bintray in two ways:

  • Using the command line, add the following to your /etc/apt/sources.list system config file:

echo "deb https://dl.bintray.com/<USERNAME>/<REPOSITORY_NAME> {distribution} {components}" | sudo tee -a /etc/apt/sources.list

or

  • Add the repository URLs using the "Software Sources" admin UI:

deb https://dl.bintray.com/<USERNAME>/<REPOSITORY_NAME> {distribution} {components}

Uploading Files

Distributing files via Bintray includes three steps: creating a version, uploading the files and publishing the files as follows:

  1. Creating a Version: Uploaded files are associated with a specific version of a package. In some cases, the upload process creates the version automatically; in other cases you need to create a target version through the Bintray UI or using the REST API.

  2. Uploading: You can upload (or deploy) your files using cURL as described below. After uploading your files, the files have a status of "un-published". This means that in the Bintray UI, they are only visible to you and can only be downloaded with your username and API Key. While your uploaded files are still "un-published", you can still discard them before anyone sees or downloads them. The Bintray UI indicates files that are un-published and provides links to publish or discard them.

  3. Publishing: Once you are ready to expose your uploaded files, you can publish them and make them visible and available to all Bintray users. Files can be published via the Bintray UI, or via the REST API, both as part of the upload, or separately. In some cases, uploading the files publishes them automatically, so you can skip this step.

The cURL command to upload Debian packages is as follows:

 curl -T <FILE.deb> -u<USER_NAME>:<API_KEY> https://api.bintray.com/content/<USERNAME>/<REPOSITORY_NAME>/<PACKAGE_NAME>/<VERSION_NAME>/<FILE_TARGET_PATH>;deb_distribution=<DISTRIBUTIONS>;deb_component=<COMPONENTS>;deb_architecture=<ARCHITECTURES>

You can also specify multiple Debian parameters, for example:

 deb_distribution=wheezy;deb_component=main;deb_architecture=i386,amd64

For more details (including repository signing), please refer to the REST API documentation under Debian Upload.

Once your Debian package is uploaded, Bintray automatically calculates the repository-wide Debian metadata.