How and why this works but your earlier command did not work?
The asc is in plain text format. wget downloads the file. When you provide a text file to gpg --dearmor, it doesn’t like it and complains about it.
When you use curl, it doesn’t save the file (by default). Instead it displays the content on the screen which is actually piped to gpg --dearmor and it does not complain this time… the dearmored output is then saved as GPG file in /usr/share/keyring file you provided to it.
The extra /dev/null 2&>1 means that you won’t see the errors or outputs on the screen (which is good otherwise you’ll see a bunch of random ascii text when gpg dearmor is used)
Your command appeared to work fine and I appreciate the explanation.
However, on testing access to the repository, there are a number of warnings, so I’m not sure if the sources.list.d configuration is correct.
Would be interested in your thoughts.
When I run:
sudo apt-get update
I see:
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 https://linux.teamviewer.com/deb stable InRelease
Ign:5 https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye InRelease
Hit:6 https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye Release
Reading package lists... Done
W: Skipping acquire of configured file 'stable/binary-amd64/Packages' as repository 'https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye InRelease' doesn't have the component 'stable' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stable/i18n/Translation-en' as repository 'https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye InRelease' doesn't have the component 'stable' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stable/i18n/Translation-en_AU' as repository 'https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye InRelease' doesn't have the component 'stable' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stable/dep11/Components-amd64.yml' as repository 'https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye InRelease' doesn't have the component 'stable' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stable/dep11/icons-48x48.tar' as repository 'https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye InRelease' doesn't have the component 'stable' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'stable/dep11/icons-64x64.tar' as repository 'https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye InRelease' doesn't have the component 'stable' (component misspelt in sources.list?)
Are the warnings normal, or have I messed up?
The sources.list.d entry is:
deb [signed-by=/usr/share/keyrings/bacula-community.gpg] https://www.bacula.org/packages/@access_key@/debs/13.0.3 bullseye main stable
Note: The ‘@access-key@’ is really the character string from the registration e-mail, I’m not sure if this string is considered to be private, so I have substituted in this post just in case.