sbt: publish to corporate Nexus repository unauthorized

前端 未结 2 1984
有刺的猬
有刺的猬 2021-01-30 23:46

Quick resolution

The required credential expects the exact realm as defined by nexus. See below how to find the one you have defined, but most certainly

2条回答
  •  醉酒成梦
    2021-01-30 23:50

    Ivy uses the realm of the WWW-Authenticate header, which will have to match byte-for-byte equal to the one configured in your credentials file.

    sbt-aether-deploy uses the same header, but uses Aether as its deployment mechanism. Ivy does not.

    The easiest way of figuring out the value of the WWW-Authenticate header is by using cURL.

    curl -X POST http://nexus/content/repositories/libs-snapshots -v > /dev/null
    

    cURL will prompt you for a user and pass.

    -v will add verbosity so you will be able to see the headers of the request and response.

提交回复
热议问题