Artifacts ERROR: Uploading artifacts to coordinator... forbidden

My .gitlab-ci.yml code

stages:
  - build
  - test

build:
  stage: build
  script:
    - echo "DEFAULT GIT FILE"
    - cd public
    - touch index.html
    - chmod 744 index.html
  artifacts:
    paths:
      - public

test:
  stage: test
  script:
    - echo "Testing..."
    - cat public/index.html 

I get following error

ERROR: Uploading artifacts to coordinator… forbidden id=145 responseStatus=403 Forbidden status=403 Forbidden token=token

29 FATAL: permission denied

31 ERROR: Job failed: exit status 1

Thanks
Tapan

@gitlab-greg Can you please help me sort out this error?

Thanks

Hi @Tapan.

I was unable to duplicate this error myself, as seen here: https://gitlab.com/greg/tapan-test/pipelines/129008677

Is this a self-managed GitLab instance?

If so, is gitlab_rails['artifacts_enabled'] = true set in gitlab.rb?

Can you attempt an even more minimalist CI job using just the following .gitlab-ci.yml:

test:
  script:
    - mkdir test && cd test
    - echo "Hello!" > hi.txt
  artifacts:
    paths:
      - test/

You can use this as a template.

If this doesn’t work, I’d check /var/log/gitlab/gitlab-rails/production.log for any error messages and /var/log/gitlab/nginx/gitlab_access.log for a failed POST request with HTTP status 403.

Let us know how it goes!

@gitlab-greg Thanks for your time.
I’m using gitlab-foss 12.7 version installed locally and gitlab.yml has following configured for artifacts

 ## Build Artifacts
  artifacts:
    enabled: true
    object_store:
      enabled: false
      remote_directory: artifacts
      direct_upload: true
      connection:
        provider: AWS
        aws_access_key_id: minio
        aws_secret_access_key: gdk-minio
        region: gdk
        endpoint: 'http://127.0.0.1:9000'
        path_style: true

Do you see anything missing here?

Thanks