harrah/xsbt — Issue #379: sbt blows up when publishing, during basic auth, if the username or password is too long
Author: sclasen
Created: 2012-02-23 00:29:25+00:00
State: open

Looks like the base64encoder is inserting newlines after a certain number of characters, which breaks basic auth(Maven is broken in an identical way)

java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic

scott$ cat build.sbt

publishTo := Some("repo" at "https://oss.sonatype.org/service/local/staging/deploy/maven2/")

credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", "someUsername", "someLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongPassword")

scott$ sbt publish
[info] Set current project to default-90e060 (in build file:/Users/scott/dev/heroku/ffs/)
[info] Updating {file:/Users/scott/dev/heroku/ffs/}default-90e060...
[info] Wrote /Users/scott/dev/heroku/ffs/target/scala-2.9.1/default-90e060_2.9.1-0.1.pom
[info] Done updating.
[info] :: delivering :: default#default-90e060_2.9.1;0.1 :: 0.1 :: release :: Wed Feb 22 16:25:49 PST 2012
[info]	delivering ivy file to /Users/scott/dev/heroku/ffs/target/scala-2.9.1/ivy-0.1.xml
[error] {file:/Users/scott/dev/heroku/ffs/}default-90e060/*:publish: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic c29tZVVzZXJuYW1lOnNvbWVMb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29v
[error] b29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb25nUGFzc3dvcmQ=
[error] Total time: 1 s, completed Feb 22, 2012 4:25:50 PM