Hello Yifei,

I tried adding these line directly:

credentials += Credentials("Apache Nexus Repository Manager", "
repository.apache.org", "wei.c...@apache.org", "******")
publishTo := {
  val nexus = "https://repository.apache.org/";
  if (isSnapshot.value)
    Some("snapshots" at nexus + "content/repositories/snapshots")
  else
    Some("releases"  at nexus + "service/local/staging/deploy/maven2")
}

The error that I am getting is

TypeError: a bytes-like object is required, not 'str'

                                                  --scala_out:
protoc-gen-scala: Plugin failed with status code 1.

                                     java.lang.RuntimeException:
protoc returned exit code: 1

                              at
scala.sys.package$.error(package.scala:27)


Are you getting the same error?
Or if you can try to change your account to the full Apache Email first?
Cus I think it only recognizes the full email.

Best Regards
Wei

On Mon, Jun 17, 2019 at 9:05 AM Zhang Yifei <yifeizh...@apache.org> wrote:

> Hello guys, i need a hand here about publishing Engine-Executor to Apache
> MARVIN-45 <https://issues.apache.org/jira/browse/MARVIN-45>/MARVIN-56
> <https://issues.apache.org/jira/browse/MARVIN-56>.
>
> Error log:
> -------------
> [error] Unable to find credentials for [Sonatype Nexus Repository Manager @
> repository.apache.org].
> [error]   Is one of these realms misspelled for host [
> repository.apache.org
> ]:
> [error]   * Apache Nexus Repository Manager
> [trace] Stack trace suppressed: run last *:publishSigned for the full
> output.
> [error] (*:publishSigned) java.io.IOException: Access to URL
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/marvin/marvin-engine-executor_2.12/0.0.5-SNAPSHOT/marvin-engine-executor_2.12-0.0.5-SNAPSHOT.jar.asc
> was refused by the server: Unauthorized
> [error] Total time: 5 s, completed 17/06/2019 10:49:14
> ------------
>
> The release configuration is practically done.
> I have tried to publish locally and it worked(Changed Apache repo host to
> publishTo := Some(Resolver.file("file",  new File(
> "/home/zhangyifei/Desktop" )) )).
> The current value of "publishTo" in build.sbt is
>
> publishTo := {val nexus = "https://repository.apache.org/";
>   if (isSnapshot.value)
>     Some("snapshots" at nexus + "content/repositories/snapshots")
>   else
>     Some("releases"  at nexus + "service/local/staging/deploy/maven2")
> }
>
>
> So apparently the problem is Apache Credential setting.
>
> Putting "credentials += Credentials("Apache Nexus Repository Manager", "
> repository.apache.org", "yifeizhang", "MyPassword)" in build.sbt  is not
> working,
> and creating a local file in /home/user/.sbt/sbtversion/sonatype.sbt with
> credentials informations either(This worked for me when i published
> artifact to sonatype repo).
>
> Does anyone have any idea about how to set credentials for artifact
> publish.
>
>
> Best regards
>

Reply via email to