image: node:latest
definitions:
steps:
- step: &renovate-step
name: Run Renovate
script:
- npm install -g renovate
- renovate --platform bitbucket --endpoint https://api.bitbucket.org/ --username ${USERNAME} --token ${APP_TOKEN} --autodiscover true
pipelines:
default:
- step:
name: 'Placeholder Default Step'
script:
- echo "This is a placeholder step for the default pipeline."
custom:
scheduled_renovate:
- step:
<<: *renovate-step
This pipline throws the following error. I can confirm that the app token used is correct.
+ renovate --platform bitbucket --endpoint https://api.bitbucket.org/ --username ${USERNAME} --token ${APP_TOKEN} --autodiscover true
(node:114) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
ERROR: bitbucket getRepos error
"err": {
"name": "HTTPError",
"code": "ERR_NON_2XX_3XX_RESPONSE",
"timings": {
"start": 1713945223419,
"socket": 1713945223419,
"lookup": 1713945223419,
"connect": 1713945223419,
"secureConnect": 1713945223419,
"upload": 1713945223419,
"response": 1713945223504,
"end": 1713945223505,
"phases": {
"wait": 0,
"dns": 0,
"tcp": 0,
"tls": 0,
"request": 0,
"firstByte": 85,
"download": 1,
"total": 86
}
},
"message": "Response code 401 (Unauthorized)",
"stack": "HTTPError: Response code 401 (Unauthorized)\n at Request.<anonymous> (/usr/local/lib/node_modules/renovate/node_modules/got/dist/source/as-promise/index.js:118:42)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)",
"options": {
"headers": {
"user-agent": "RenovateBot/37.320.0 (https://github.com/renovatebot/renovate)",
"accept": "application/json",
"authorization": "***********",
"accept-encoding": "gzip, deflate, br"
},
"url": "https://api.bitbucket.org/2.0/repositories?role=contributor&pagelen=100",
"hostType": "bitbucket",
"username": "",
"password": "",
"method": "GET",
"http2": false
},
"response": {
"statusCode": 401,
"statusMessage": "Unauthorized",
"body": {
"type": "error",
"error": {
"message": "Token is invalid or not supported for this endpoint."
}
},
"headers": {
"date": "Wed, 24 Apr 2024 07:53:43 GMT",
"content-type": "application/json",
"content-length": "95",
"server": "AtlassianEdge",
"www-authenticate": "OAuth realm=\"Bitbucket.org HTTP\"",
"etag": "\"bbe089b08de73c5e8547da71615cd8b0\"",
"vary": "Origin",
"x-dc-location": "Micros-3",
"x-served-by": "ca15dc7e9bdf",
"x-version": "2767ae4f0e6e",
"x-static-version": "2767ae4f0e6e",
"x-request-count": "429",
"x-render-time": "0.0026738643646240234",
"x-b3-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"x-b3-spanid": "c0296c4fd928aafb",
"x-frame-options": "SAMEORIGIN",
"x-usage-user-time": "0.006830",
"x-usage-system-time": "0.000000",
"x-usage-input-ops": "0",
"x-usage-output-ops": "0",
"x-trace-id": "33fac901a9504be99ec9f17e8f2605f8",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"api-via-stargate": "True",
"x-content-type-options": "nosniff",
"x-xss-protection": "1; mode=block",
"atl-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"report-to": "{\"endpoints\": [{\"url\": \"https://dz8aopenkvv6s.cloudfront.net\"}], \"group\": \"endpoint-1\", \"include_subdomains\": true, \"max_age\": 600}",
"nel": "{\"failure_fraction\": 0.001, \"include_subdomains\": true, \"max_age\": 600, \"report_to\": \"endpoint-1\"}"
},
"httpVersion": "1.1",
"retryCount": 0
}
}
FATAL: Fatal error: Response code 401 (Unauthorized)
"err": {
"name": "HTTPError",
"code": "ERR_NON_2XX_3XX_RESPONSE",
"timings": {
"start": 1713945223419,
"socket": 1713945223419,
"lookup": 1713945223419,
"connect": 1713945223419,
"secureConnect": 1713945223419,
"upload": 1713945223419,
"response": 1713945223504,
"end": 1713945223505,
"phases": {
"wait": 0,
"dns": 0,
"tcp": 0,
"tls": 0,
"request": 0,
"firstByte": 85,
"download": 1,
"total": 86
}
},
"message": "Response code 401 (Unauthorized)",
"stack": "HTTPError: Response code 401 (Unauthorized)\n at Request.<anonymous> (/usr/local/lib/node_modules/renovate/node_modules/got/dist/source/as-promise/index.js:118:42)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)",
"options": {
"headers": {
"user-agent": "RenovateBot/37.320.0 (https://github.com/renovatebot/renovate)",
"accept": "application/json",
"authorization": "***********",
"accept-encoding": "gzip, deflate, br"
},
"url": "https://api.bitbucket.org/2.0/repositories?role=contributor&pagelen=100",
"hostType": "bitbucket",
"username": "",
"password": "",
"method": "GET",
"http2": false
},
"response": {
"statusCode": 401,
"statusMessage": "Unauthorized",
"body": {
"type": "error",
"error": {
"message": "Token is invalid or not supported for this endpoint."
}
},
"headers": {
"date": "Wed, 24 Apr 2024 07:53:43 GMT",
"content-type": "application/json",
"content-length": "95",
"server": "AtlassianEdge",
"www-authenticate": "OAuth realm=\"Bitbucket.org HTTP\"",
"etag": "\"bbe089b08de73c5e8547da71615cd8b0\"",
"vary": "Origin",
"x-dc-location": "Micros-3",
"x-served-by": "ca15dc7e9bdf",
"x-version": "2767ae4f0e6e",
"x-static-version": "2767ae4f0e6e",
"x-request-count": "429",
"x-render-time": "0.0026738643646240234",
"x-b3-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"x-b3-spanid": "c0296c4fd928aafb",
"x-frame-options": "SAMEORIGIN",
"x-usage-user-time": "0.006830",
"x-usage-system-time": "0.000000",
"x-usage-input-ops": "0",
"x-usage-output-ops": "0",
"x-trace-id": "33fac901a9504be99ec9f17e8f2605f8",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"api-via-stargate": "True",
"x-content-type-options": "nosniff",
"x-xss-protection": "1; mode=block",
"atl-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"report-to": "{\"endpoints\": [{\"url\": \"https://dz8aopenkvv6s.cloudfront.net\"}], \"group\": \"endpoint-1\", \"include_subdomains\": true, \"max_age\": 600}",
"nel": "{\"failure_fraction\": 0.001, \"include_subdomains\": true, \"max_age\": 600, \"report_to\": \"endpoint-1\"}"
},
"httpVersion": "1.1",
"retryCount": 0
}
}
INFO: Renovate was run at log level "info". Set LOG_LEVEL=debug in environment variables to see extended debug logs.
INFO: Renovate is exiting with a non-zero code due to the following logged errors
"loggerErrors": [
{
"name": "renovate",
"level": 50,
"logContext": "znJdvSGS402KIl3sF0KPM",
"err": {
"name": "HTTPError",
"code": "ERR_NON_2XX_3XX_RESPONSE",
"timings": {
"start": 1713945223419,
"socket": 1713945223419,
"lookup": 1713945223419,
"connect": 1713945223419,
"secureConnect": 1713945223419,
"upload": 1713945223419,
"response": 1713945223504,
"end": 1713945223505,
"phases": {
"wait": 0,
"dns": 0,
"tcp": 0,
"tls": 0,
"request": 0,
"firstByte": 85,
"download": 1,
"total": 86
}
},
"message": "Response code 401 (Unauthorized)",
"stack": "HTTPError: Response code 401 (Unauthorized)\n at Request.<anonymous> (/usr/local/lib/node_modules/renovate/node_modules/got/dist/source/as-promise/index.js:118:42)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)",
"options": {
"headers": {
"user-agent": "RenovateBot/37.320.0 (https://github.com/renovatebot/renovate)",
"accept": "application/json",
"authorization": "***********",
"accept-encoding": "gzip, deflate, br"
},
"url": "https://api.bitbucket.org/2.0/repositories?role=contributor&pagelen=100",
"hostType": "bitbucket",
"username": "",
"password": "",
"method": "GET",
"http2": false
},
"response": {
"statusCode": 401,
"statusMessage": "Unauthorized",
"body": {
"type": "error",
"error": {
"message": "Token is invalid or not supported for this endpoint."
}
},
"headers": {
"date": "Wed, 24 Apr 2024 07:53:43 GMT",
"content-type": "application/json",
"content-length": "95",
"server": "AtlassianEdge",
"www-authenticate": "OAuth realm=\"Bitbucket.org HTTP\"",
"etag": "\"bbe089b08de73c5e8547da71615cd8b0\"",
"vary": "Origin",
"x-dc-location": "Micros-3",
"x-served-by": "ca15dc7e9bdf",
"x-version": "2767ae4f0e6e",
"x-static-version": "2767ae4f0e6e",
"x-request-count": "429",
"x-render-time": "0.0026738643646240234",
"x-b3-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"x-b3-spanid": "c0296c4fd928aafb",
"x-frame-options": "SAMEORIGIN",
"x-usage-user-time": "0.006830",
"x-usage-system-time": "0.000000",
"x-usage-input-ops": "0",
"x-usage-output-ops": "0",
"x-trace-id": "33fac901a9504be99ec9f17e8f2605f8",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"api-via-stargate": "True",
"x-content-type-options": "nosniff",
"x-xss-protection": "1; mode=block",
"atl-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"report-to": "{\"endpoints\": [{\"url\": \"https://dz8aopenkvv6s.cloudfront.net\"}], \"group\": \"endpoint-1\", \"include_subdomains\": true, \"max_age\": 600}",
"nel": "{\"failure_fraction\": 0.001, \"include_subdomains\": true, \"max_age\": 600, \"report_to\": \"endpoint-1\"}"
},
"httpVersion": "1.1",
"retryCount": 0
}
},
"msg": "bitbucket getRepos error"
},
{
"name": "renovate",
"level": 60,
"logContext": "znJdvSGS402KIl3sF0KPM",
"err": {
"name": "HTTPError",
"code": "ERR_NON_2XX_3XX_RESPONSE",
"timings": {
"start": 1713945223419,
"socket": 1713945223419,
"lookup": 1713945223419,
"connect": 1713945223419,
"secureConnect": 1713945223419,
"upload": 1713945223419,
"response": 1713945223504,
"end": 1713945223505,
"phases": {
"wait": 0,
"dns": 0,
"tcp": 0,
"tls": 0,
"request": 0,
"firstByte": 85,
"download": 1,
"total": 86
}
},
"message": "Response code 401 (Unauthorized)",
"stack": "HTTPError: Response code 401 (Unauthorized)\n at Request.<anonymous> (/usr/local/lib/node_modules/renovate/node_modules/got/dist/source/as-promise/index.js:118:42)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)",
"options": {
"headers": {
"user-agent": "RenovateBot/37.320.0 (https://github.com/renovatebot/renovate)",
"accept": "application/json",
"authorization": "***********",
"accept-encoding": "gzip, deflate, br"
},
"url": "https://api.bitbucket.org/2.0/repositories?role=contributor&pagelen=100",
"hostType": "bitbucket",
"username": "",
"password": "",
"method": "GET",
"http2": false
},
"response": {
"statusCode": 401,
"statusMessage": "Unauthorized",
"body": {
"type": "error",
"error": {
"message": "Token is invalid or not supported for this endpoint."
}
},
"headers": {
"date": "Wed, 24 Apr 2024 07:53:43 GMT",
"content-type": "application/json",
"content-length": "95",
"server": "AtlassianEdge",
"www-authenticate": "OAuth realm=\"Bitbucket.org HTTP\"",
"etag": "\"bbe089b08de73c5e8547da71615cd8b0\"",
"vary": "Origin",
"x-dc-location": "Micros-3",
"x-served-by": "ca15dc7e9bdf",
"x-version": "2767ae4f0e6e",
"x-static-version": "2767ae4f0e6e",
"x-request-count": "429",
"x-render-time": "0.0026738643646240234",
"x-b3-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"x-b3-spanid": "c0296c4fd928aafb",
"x-frame-options": "SAMEORIGIN",
"x-usage-user-time": "0.006830",
"x-usage-system-time": "0.000000",
"x-usage-input-ops": "0",
"x-usage-output-ops": "0",
"x-trace-id": "33fac901a9504be99ec9f17e8f2605f8",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"api-via-stargate": "True",
"x-content-type-options": "nosniff",
"x-xss-protection": "1; mode=block",
"atl-traceid": "33fac901a9504be99ec9f17e8f2605f8",
"report-to": "{\"endpoints\": [{\"url\": \"https://dz8aopenkvv6s.cloudfront.net\"}], \"group\": \"endpoint-1\", \"include_subdomains\": true, \"max_age\": 600}",
"nel": "{\"failure_fraction\": 0.001, \"include_subdomains\": true, \"max_age\": 600, \"report_to\": \"endpoint-1\"}"
},
"httpVersion": "1.1",
"retryCount": 0
}
},
"msg": "Fatal error: Response code 401 (Unauthorized)"
}
]
What i might be doing wrong here? The App Token has Read, Write and Admin access.