I have a hosted apt repo configured in nexus which I am trying to configure in my local Debian machine.
/etc/apt/sources.list.d/cust-repository.list file:
deb [trusted=yes] https://nexusrepourl.org/repository/apt/ bullseye main
When I try to do a apt-get update, I was getting below error:
Err:7 https://nexusrepourl.org/repository/apt bullseye/main amd64 Packages
404 dists/bullseye/main/binary-amd64/Packages.xz [IP: xx.xx.xx.xxx 443]
Ign:8 https://nexusrepourl.org/repository/apt bullseye/main all Packages
Ign:9 https://nexusrepourl.org/repository/apt bullseye/main Translation-en
Reading package lists... Done
E: Failed to fetch https://nexusrepourl.org/repository/apt/dists/bullseye/main/binary-amd64/Packages 404 dists/bullseye/main/binary-amd64/Packages.xz [IP: xx.xx.xx.xxx 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
I have removed all files from /var/lib/apt/lists/ as mentioned in official documentation Apt Repositories
To fix this, I have added ‘arch=amd64’ as well to sources.list.d file. But now it fails with below error:
Get:5 https://nexusrepourl.org/repository/apt-deb-bullseye bullseye InRelease [1067 B]
Reading package lists... Done
W: No Hash entry in Release file /var/lib/apt/lists/partial/nexus.repourl.org_repository_apt-deb-bullseye_dists_bullseye_InRelease
E: The repository 'https://nexusrepourl.org/repository/apt-deb-bullseye bullseye InRelease' provides only weak security information.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
Note: I have added trusted=yes, because initially I couldn’t make gpg private/public configuration work, it was failing with ‘The following signatures couldn’t be verified because the public key is not available’ error.
Anyone please help me understand how to get around this. Thank you.