Dependencies from private registries need credentials. If they are missing, Renovate does not abort – it simply creates no PRs and writes “Renovate failed to look up the following dependencies” into the Dependency Dashboard.
Symptom
renovate shop/shop-api 2>&1 | grep -E "^ (WARN|ERROR)|Failed to look up" | cut -c1-88
WARN: Error obtaining docker token (repository=shop/shop-api)
WARN: Package lookup failures (repository=shop/shop-api)
"Failed to look up docker package 127.0.0.1:3000/shop/base: no-result",
"Failed to look up npm package @shop/money: no-result"
No abort, no PR – only warnings in the log and the dashboard.
Diagnosis
The debug log shows two different errors: 401 for npm, a TLS error for Docker.
LOG_LEVEL=debug renovate shop/shop-api > ../debug-1.log 2>&1 grep -E "statusCode=" ../debug-1.log \ | sed -E 's/.*GET ([^ ]+) .*statusCode=(-?[0-9]+).*/\2 \1/' grep -o "wrong version number" ../debug-1.log | head -1 -1 https://127.0.0.1:3000/v2/shop/base/tags/list?n=10000 401 http://127.0.0.1:3000/api/packages/shop/npm/@shop%2Fmoney wrong version number
Causes
401No credentials for the npm registry
The private npm registry requires a token; without matching hostRules it answers 401.
https:// vs http://The Docker datasource always assumes https
For registries without a scheme the Docker datasource assumes https:// and fails the TLS handshake with an HTTP server (wrong version number). In the lab this needs insecureRegistry, in production never.
matchHosthostRules without a scheme do not match
A matchHost with a port but no scheme becomes https://127.0.0.1:3000 and is compared as a prefix – http://… then does not match and the 401 remains.
Fix
export RENOVATE_HOST_RULES=$(jq -nc --arg t "$RENOVATE_TOKEN" '[
{matchHost: "http://127.0.0.1:3000/api/packages/", hostType: "npm", token: $t},
{matchHost: "127.0.0.1", hostType: "docker", username: "renovate-bot",
password: $t, insecureRegistry: true}
]')
renovate shop/shop-api 2>&1 | grep -cE "^ WARN"
0
Don't: Using the bot's login password as the registry password. A token is enough, and it can be revoked individually.
Renovate hands-on, day 8: private registries, hostRules, the failure without credentials and new versions.
Go to day 8 →
FAQ
Does Renovate open an issue for missing credentials?
Not for registries. In Renovate 44 the issue “Action Required: Add missing credentials” only appears for Merge Confidence; registry problems show up in the dashboard and the log.
What does matchHost with a port mean?
Renovate turns it into https://host:port and compares it as a prefix – http:// registries need a full URL with the scheme.