diff --git a/plugins/nexus-repository-apt/src/main/java/org/sonatype/nexus/repository/apt/internal/hosted/AptHostedFacet.java b/plugins/nexus-repository-apt/src/main/java/org/sonatype/nexus/repository/apt/internal/hosted/AptHostedFacet.java index 966e084004..05b788709e 100644 --- a/plugins/nexus-repository-apt/src/main/java/org/sonatype/nexus/repository/apt/internal/hosted/AptHostedFacet.java +++ b/plugins/nexus-repository-apt/src/main/java/org/sonatype/nexus/repository/apt/internal/hosted/AptHostedFacet.java @@ -172,11 +172,14 @@ public void rebuildIndexes(final List changes) throws IOException { releaseFile = buildReleaseFile(aptFacet.getDistribution(), store.getFiles().keySet(), md5Builder.toString(), sha256Builder.toString()); } + releaseFile = releaseFile.replace("\r", ""); aptFacet.put(releaseIndexName(RELEASE), new BytesPayload(releaseFile.getBytes(Charsets.UTF_8), AptMimeTypes.TEXT)); byte[] inRelease = signingFacet.signInline(releaseFile); + inRelease = new String(inRelease, Charsets.UTF_8).replace("\r", "").getBytes(); aptFacet.put(releaseIndexName(INRELEASE), new BytesPayload(inRelease, AptMimeTypes.TEXT)); byte[] releaseGpg = signingFacet.signExternal(releaseFile); + releaseGpg = new String(releaseGpg, Charsets.UTF_8).replace("\r", "").getBytes(); aptFacet.put(releaseIndexName(RELEASE_GPG), new BytesPayload(releaseGpg, AptMimeTypes.SIGNATURE)); }