Config-help: Trying to encrypt npmrc which is too long according to https://app.renovatebot.com/encrypt

Created on 3 Jul 2020  路  6Comments  路  Source: renovatebot/config-help

Which Renovate are you using?

WhiteSource Renovate App

Which platform are you using?

GitHub Enterprise

Have you checked the logs? Don't forget to include them if relevant

No access to them

What would you like to do?

Increase the maximum input size for the encryption tool.

The npmrc in question looks something like this, the tokens are not included:

@finnair:registry=https://nexus.development.tool.clouds.finnair.com/nexus/repository/npm/
@fcom:registry=https://nexus.development.tool.clouds.finnair.com/nexus/repository/npm/
@finnairoyj:registry=https://npm.pkg.github.com
always-auth=true
//npm.pkg.github.com/:_authToken=......
//nexus.development.tool.clouds.finnair.com/nexus/repository/npm/:_auth=.....
[email protected]
pending-closure

Most helpful comment

Nope, for the auth part (if only one of them) he can use the encryped npmToken.

{
  "encrypted": {
    "npmToken": "XXXXXXXXXX=="
  },
  "npmrc": "@finnair:registry=https://nexus.development.tool.clouds.finnair.com/nexus/repository/npm/\n//nexus.development.tool.clouds.finnair.com/nexus/repository/npm:_auth=${NPM_TOKEN}",
  "hostRules": [
    {
      "hostType": "npm",
      "baseUrl": "npm.pkg.github.com",
      "encrypted": { "token": "YYYYYYY==" }
    }
  ]
}

猬嗭笍 need to add all registries

All 6 comments

Unfortunately this may be a use case we don't have a solution for just yet. Normally you could configure just an encrypted npmToken with an unencrypted npmrc however I notice that you have two tokens, so a single token wouldn't work.

for the _authToken lines he can use hostRules

```json
{
"hostType": "npm",
"baseUrl": "npm.pkg.github.com",
"encrypted": { "token": "...." }
}

I note there's both _authToken= and _auth usage there and I think we support _authToken only right now

Nope, for the auth part (if only one of them) he can use the encryped npmToken.

{
  "encrypted": {
    "npmToken": "XXXXXXXXXX=="
  },
  "npmrc": "@finnair:registry=https://nexus.development.tool.clouds.finnair.com/nexus/repository/npm/\n//nexus.development.tool.clouds.finnair.com/nexus/repository/npm:_auth=${NPM_TOKEN}",
  "hostRules": [
    {
      "hostType": "npm",
      "baseUrl": "npm.pkg.github.com",
      "encrypted": { "token": "YYYYYYY==" }
    }
  ]
}

猬嗭笍 need to add all registries

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs.

Thank you for the help, I got the authentication with several registries sorted out!
Little did I realise how powerful could https://docs.renovatebot.com/configuration-options/#hostrules be...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bjeanes picture bjeanes  路  9Comments

jugaltheshah picture jugaltheshah  路  4Comments

simoneb picture simoneb  路  10Comments

HonkingGoose picture HonkingGoose  路  4Comments

billyto picture billyto  路  9Comments