Configure APT for your repository

You can configure APT to use your Gemfury repository. To start, create a fury.list file in the /etc/apt/sources.list.d directory. You will need sudo access to make these changes:

Here is a basic template for /etc/apt/sources.list.d/fury.list:

deb https://apt.fury.io/USERNAME/ * *

Or run this “one-liner”:

$ echo "deb https://apt.fury.io/USERNAME/ * *" > \
/etc/apt/sources.list.d/fury.list

Your public repository is signed with Gemfury’s GPG key, which you should add to your system’s list of trusted keys:

$ curl https://apt.fury.io/USERNAME/gpg.key | sudo apt-key add -

Your public repository is off by default, so you may need to authenticate into your private repository to retrieve the public key file.

Access your private repository

You can access your private DEB packages, but enabling authentication to your repository. To do this, add the following entry to /etc/apt/auth.conf file or create fury.conf inside /etc/apt/auth.conf.d directory.

The entry will appear as follows:

machine apt.fury.io
  login USERNAME
  password TOKEN

Keep your credentials file secure by setting it to be readable only by the system user you intend to use to run APT. Typically, this is root.

Retrieving the GPG key from your private repository also requires authentication:

$ curl https://TOKEN@apt.fury.io/USERNAME/gpg.key | sudo apt-key add -

With the authentication configured, you can install private packages as you normally would using APT. Learn more about APT authentication here.

Requires APT version 0.7.25 or later. Please note that APT will ignore auth.conf config entirely if the password is omitted or left blank.


Next