Authenticate on the Beckhoff Package Server
The following section describes how to authenticate yourself on the Beckhoff Package Server. 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.confStore 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- Machine: The name of the Package Server that
aptshould connect to (in this case deb.beckhoff.com and deb-mirror.beckhoff.com) is specified here. - Login and password: The login details of your myBeckhoff account are used for authentication.
To save the file, press [Ctrl] + [O]. To exit the editor, press [Ctrl] + [X].
To reduce the risk of a credential leak, the authentication file can be saved temporarily and deleted after use. Temporary files are usually stored at /tmp.
Depending on the system configuration, files at /tmp are automatically cleaned up during a shutdown. The file for authentication can be created at /tmp/bhf.conf, for example, and then transferred to apt as follows:
sudo apt -o Dir::Etc::netrc=/tmp/bhf.conf updateOf course, you can always manually delete bhf.conf. Furthermore, read and write access to bhf.conf should only be permitted to users with root rights. This configuration prevents access by non-privileged users. In this example, the owner is root, and the authorization is restricted to read and write for root:
sudo touch /tmp/bhf.conf && sudo chmod 600 /tmp/bhf.conf
ls -l /tmp/bhf.conf
-rw------- 1 root root 0 Feb 4 06:57 /tmp/bhf.conf