Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

permission denied #39

Open
oromojunior opened this issue Jun 17, 2020 · 2 comments
Open

permission denied #39

oromojunior opened this issue Jun 17, 2020 · 2 comments

Comments

@oromojunior
Copy link

The problem

When running in GitLab CI there

  • anchore_ci_tools.py -a -r --timeout 500 --image $CI_REGISTRY/hello-world:v1.99.99
    ERROR executing script - Exception: [Errno 13] Permission denied: 'anchore-reports/hello-world_v1.99.99-content-os.json'

Environment

GitLab Ci on gitlab.com

Details

Actual Behaviour

$ anchore_ci_tools.py -a -r --timeout 500 --image $CI_REGISTRY/hello-world:v1.99.99

Image submitted to Anchore Engine: hello-world:v1.99.99
Waiting for analysis to complete...
Status: not_analyzed
Status: analyzing..
Status: analyzed
Analysis completed!
ERROR executing script - Exception: [Errno 13] Permission denied: 'anchore-reports/hello-world_v1.99.99-content-os.json'
Authenticating with credentials from /root/.docker/config.json
00:02
Uploading artifacts...
anchore-reports/*: found 5 matching files
Uploading artifacts to coordinator... ok id=12274 responseStatus=201 Created token=o2iy3TDJ
ERROR: Job failed: exit code 1

Expected Behaviour

How do you reproduce the error?

container_scan_service:
stage: Scan
variables:
ANCHORE_CLI_URL: "http://anchore-engine:8228/v1"
GIT_STRATEGY: none
image: docker.io/anchore/inline-scan:latest
services:

  • name: docker.io/anchore/inline-scan:latest
    alias: anchore-engine
    command: ["start"]

script:

  • source /opt/rh/rh-python36/enable && rm -rf anchore-reports
  • anchore-cli system wait
  • anchore-cli image add $CI_REGISTRY/hello-world:v1.99.99
  • anchore-cli registry list
  • anchore-cli --u admin --p foobar image list
  • anchore-cli registry add "$CI_REGISTRY" gitlab-ci-token "$CI_JOB_TOKEN" --skip-validate
  • anchore_ci_tools.py -a -r --timeout 500 --image $CI_REGISTRY/hello-world:v1.99.99

artifacts:
when: always
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}
paths:
- anchore-reports/*

@robertp
Copy link
Contributor

robertp commented Oct 26, 2020

@oromojunior Thank you for reporting this. Are you still encountering this issue?

@mrigankt
Copy link

mrigankt commented Jul 6, 2021

hi guys I am facing this issue any solution to this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants