Creation of an authentication file for APT:

The /etc/apt/auth.conf.d/ directory is intended for the authentication files of apt. Files in this directory are automatically read by apt and used for authentication. Create a file named bhf.conf in that directory using the command:

sudo nano /etc/apt/auth.conf.d/bhf.conf

Store the access data for the Beckhoff Package Server in this file. Contents of the file bhf.conf:

machine deb.beckhoff.com
login example@mail.com
password xyz123

machine deb-mirror.beckhoff.com
login example@mail.com
password xyz123

To save the file, press [Ctrl] + [O]. To exit the editor, press [Ctrl] + [X].