How to use authentication with Nexus hosted Bower without plain text credentials

342 Views Asked by At

We have Bower hosted in a Nexus 3 repository. Our .bowerrc file looks like:

{
    "directory": "bower_components",
    "registry": {
        "search": [
            "https://<host>/nexus/repository/bower/"
        ]
    },
    "resolvers": [ "bower-nexus3-resolver" ]
}

So far it has had anonymous access so this worked fine. However, Nexus has now had authentication enabled so we need some way of authenticating.

I've read some documentation and it suggests we need to add

{
  "nexus" : {
    "username" : "myusername",
    "password" : "mypassword"
  }
} 

But this uses plain text credentials. Is there a way to use authentication without plain text credentials?

1

There are 1 best solutions below

0
joedragons On

Professional (licensed) customers can use user tokens as documented here.

To OSS users, I know that might sound a bit like NXRM doesn't care, but what is shown there comes from Bower not from NXRM, so to have that guarded, is really (in this example) a Bower change.