Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Renovate with Bitbucket Pipeline got permission problem

Yudi Belanja
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 12, 2022

Hi,

I got this error when running the pipeline with renovate docker image "renovate/renovate:slim"

DEBUG: lock file error (repository=<workspace-id>/<repo-name>, branch=renovate/renovate-old-pkg-1.x-lockfile)
"err": {
"name": "ExecError",
"cmd": "/bin/sh -c docker run --rm --name=renovate_sidecar --label=renovate_child -v \"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\":\"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\" -v \"/opt/atlassian/pipelines/agent/build/renovate/cache\":\"/opt/atlassian/pipelines/agent/build/renovate/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w \"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\" docker.io/renovate/sidecar bash -l -c \"install-tool node v16.18.0 && install-tool npm 6.14.17 && hash -d npm 2>/dev/null || true && npm install --package-lock-only --no-audit --ignore-scripts renovate-old-pkg@1.2.0\"",
"stderr": "You don't have permission to create /opt/atlassian/pipelines/agent/build/renovate/cache/containerbase/3db514d36762fa900083ca75b6f456ae59f4c109ca3996794db6ab3345d5fdcd.\ncurl: (23) Failed writing received data to disk/application\nDownload failed: https://nodejs.org/dist/v16.18.0/node-v16.18.0-linux-x64.tar.xz\nbash: npm: command not found\n",
"stdout": "installing v2 tool node v16.18.0\n",
"options": {
"cwd": "/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>",
"encoding": "utf-8",
"env": {
"NPM_CONFIG_CACHE": "/opt/atlassian/pipelines/agent/build/renovate/cache/others/npm",
"npm_config_store": "/opt/atlassian/pipelines/agent/build/renovate/cache/others/pnpm",
"HOME": "/home/ubuntu",
"PATH": "/home/ubuntu/bin:/home/ubuntu/.npm-global/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LC_ALL": "C.UTF-8",
"LANG": "C.UTF-8",
"DOCKER_HOST": "tcp://localhost:2375",
"BUILDPACK_CACHE_DIR": "/opt/atlassian/pipelines/agent/build/renovate/cache/containerbase",
"CONTAINERBASE_CACHE_DIR": "/opt/atlassian/pipelines/agent/build/renovate/cache/containerbase"
},
"maxBuffer": 10485760,
"timeout": 900000
},
"exitCode": 127,
"message": "Command failed: docker run --rm --name=renovate_sidecar --label=renovate_child -v \"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\":\"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\" -v \"/opt/atlassian/pipelines/agent/build/renovate/cache\":\"/opt/atlassian/pipelines/agent/build/renovate/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w \"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\" docker.io/renovate/sidecar bash -l -c \"install-tool node v16.18.0 && install-tool npm 6.14.17 && hash -d npm 2>/dev/null || true && npm install --package-lock-only --no-audit --ignore-scripts renovate-old-pkg@1.2.0\"\nYou don't have permission to create /opt/atlassian/pipelines/agent/build/renovate/cache/containerbase/3db514d36762fa900083ca75b6f456ae59f4c109ca3996794db6ab3345d5fdcd.\ncurl: (23) Failed writing received data to disk/application\nDownload failed: https://nodejs.org/dist/v16.18.0/node-v16.18.0-linux-x64.tar.xz\nbash: npm: command not found\n",
"stack": "ExecError: Command failed: docker run --rm --name=renovate_sidecar --label=renovate_child -v \"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\":\"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\" -v \"/opt/atlassian/pipelines/agent/build/renovate/cache\":\"/opt/atlassian/pipelines/agent/build/renovate/cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w \"/opt/atlassian/pipelines/agent/build/renovate/repos/bitbucket/<workspace-id>/<repo-name>\" docker.io/renovate/sidecar bash -l -c \"install-tool node v16.18.0 && install-tool npm 6.14.17 && hash -d npm 2>/dev/null || true && npm install --package-lock-only --no-audit --ignore-scripts renovate-old-pkg@1.2.0\"\nYou don't have permission to create /opt/atlassian/pipelines/agent/build/renovate/cache/containerbase/3db514d36762fa900083ca75b6f456ae59f4c109ca3996794db6ab3345d5fdcd.\ncurl: (23) Failed writing received data to disk/application\nDownload failed: https://nodejs.org/dist/v16.18.0/node-v16.18.0-linux-x64.tar.xz\nbash: npm: command not found\n\n at ChildProcess.<anonymous> (/usr/src/app/node_modules/renovate/lib/util/exec/common.ts:99:11)\n at ChildProcess.emit (node:events:525:35)\n at ChildProcess.emit (node:domain:489:12)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)"
},

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 17, 2022

Hi @Yudi Belanja and welcome to the community!

Would it be possible to share:

  • the content of your bitbucket-pipelines.yml file
    (please make sure to sanitize any sensitive/private data in the file, if any, prior to sharing here)
  • which command from the yml file is failing with this error

Just a heads up, I removed the workspace id and repo name from the output you shared to protect your privacy.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events