diff --git a/lib/config/get-credentials-by-uri.js b/lib/config/get-credentials-by-uri.js index 5e672696b2e53..21926c6865993 100644 --- a/lib/config/get-credentials-by-uri.js +++ b/lib/config/get-credentials-by-uri.js @@ -34,6 +34,12 @@ function getCredentialsByURI (uri) { return c } + if (this.get(nerfed + ':-authtoken')) { + c.token = this.get(nerfed + ':-authtoken') + // the bearer token is enough, don't confuse things + return c + } + // Handle the old-style _auth= style for the default // registry, if set. var authDef = this.get('_auth')