How to install RPM/APT repositories through a HTTPS proxy

Gabriele Bartolini
Gabriele Bartolini

This article describes how to install an RPM or APT repository maintained by EDB when your server is behind a HTTPS proxy.

For security reasons, especially in large organisations, it is common to operate on Linux servers that are protected by firewalls and that are behind HTTP proxies which limit and control what can be accessed on the web.

Our RPM and APT repositories contain certified packages and are available only through secure connections, via HTTPS.

Fortunately, our installation instructions rely on standard tools such as curl , bash and yum and, if systems have been properly configured by system administrators, they should work without any intervention - even if you need a proxy to access our repositories.

However, in some cases, the required configuration is not present and you might need to request some changes to the system administration department.

Collect information about your proxy

First, you will need to find out from your IT/security department the IP address and port of your local HTTP proxy. If there's a proxy in your organization, they will certainly know how to help you.

Also, especially for Red Hat systems, you will need to know more information about how your organization manages software distribution policies, whether you have full autonomy on what to install or whether the inventory of software is centrally managed via, for example, Red Hat Satellite.

Please feel free to open a support issue if you think you need our help with this topic.

Install the repository definition

Once you have been given the required information about the proxy location, write down the setting - in the examples below, we suppose the proxy is listening on IP address, port 8888.

We now need to inform curl to access our portal via the proxy.

Before executing the instructions detailed in the repository subscription page, you need to set the https_proxy variable to point to the proxy:

export https_proxy=
curl <REPOSITORY_URL> | bash

IMPORTANT: You need to be root user to install the repository.

Alternatively, you can use sudo as follows:

export https_proxy=
curl <REPOSITORY_URL> | sudo https_proxy=${https_proxy} bash

Notes about RedHat installations

When our repository installation script detects that a https_proxy environment variable has been set, it automatically adds the required proxy configuration in the definition file located inside the /etc/yum.repos.d directory.

The following example is extracted from the definition file of our public PostgreSQL 10 repository for RedHat (/etc/yum.repos.d/2ndquadrant-dl-default-release-pg10.repo):

name=2ndQuadrant packages (PG10) for $releasever - $basearch


If later you want to remove the proxy or change it, you need to edit the repository definition file accordingly.

Notes about Debian/Ubuntu installations

Differently from Red Hat systems, if you need to use our repositories behind a proxy, you will also need to make sure the Acquire::https::Proxy directive is properly set in /etc/apt/apt.conf or in other configuration files inside the /etc/apt/apt.conf.d directory.

Was this article helpful?

0 out of 0 found this helpful