Affects Version/s: 3.19.1, 3.25.0
Fix Version/s: None
Environment:Windows Server 2012 R2 64-bit, IIS 8.5
I've setup Nexus on an IIS and I created some APT repositories.
I've successfully uploaded a couple of packages in it, but when I try doing apt-get update from a client (especially an older one), I get the following error:
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
After some research, it seems that the problem is that IIS (being on Windows) sends the InRelease file with CRLF instead of LF. If I manually (I'm using Fiddler as a proxy-in-the-middle) remove the CR characters from the output, apt-get update works perfectly (I've managed to install a couple of packages).
I have made a patch and pull request for the fix from when nexus-repository-apt was a separate plugin. It was a simple fix, really, just replace \r with the empty string. The original pull request probably doesn't work as-is anymore, because the file has changed since then, but the principle remains the same: Add these three lines before signing the release files:
releaseFile = releaseFile.replace("\r", "");
inRelease = new String(inRelease, Charsets.UTF_8).replace("\r", "").getBytes();
releaseGpg = new String(releaseGpg, Charsets.UTF_8).replace("\r", "").getBytes();
A pull request might follow, if applicable.