I’ve just added my first my first apt repo.
Uploading artefacts is working great, but I’m struggeling to add the repo to apt. Right now it needs a user for downloading the files. Doing that manually works great too. And I know how to add auth info to apt, which is working as well (if I change the PW I get a 401 instead of the other error I’m about to describe).
Now when I add it apt and run apt-get update, I get this error message from apt:
E: Failed to fetch https://repo.mycompany.com/repository/apt-develop/dists/buster/InRelease 400 Bad Request [IP: 10.128.1.101 443]
E: The repository 'https://repo.mycompany.com/repository/apt-develop buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I checked the Nexus logs but there was nothing to be found either.
What can I do?
Update:
I just double checked some things. When I allow anonymous users to access the repo and remove the auth from the config then it works.
So Nexus isn’t liking something about the request when auth is used.
Would you please try to set credentials in the source.list directly? e.g. deb http://apt:0urSup3rS3cr37P@$$w0rd!@repo.mycompany.com/repository/apt-develop buster main
A 400 response won’t have anything to do with authentication, it means that an invalid request was received. Have you checked the request.log to see what request is returning the 400 response?
Alright. I managed to find the issue.
The password contained some special chars that caused issues apparently. Changing it to one without those made it work.
From the looks of it either _ or / was causing issues here. But can’t tell for sure.