Skip to content

Composer fails with permissions #395

Open
@evs-xsarus

Description

@evs-xsarus

Expected Behavior

Composer install should run without issues.

Current Behavior

Composer fails with permission errors:

$ cd magento/
$ composer config gitlab-token.git.xsarus.net gitlab-ci-token "${CI_JOB_TOKEN}"
The repository at "/builds/shm/webshop-magento/magento" does not have the correct ownership and git refuses to use it:
fatal: detected dubious ownership in repository at '/builds/shm/webshop-magento'
In Filesystem.php line 913:
                                                                               
  file_put_contents(/builds/shm/webshop-magento/magento/vendor/composer/installed.php): Failed to open stream: Permission denied

Possible Solution

Use the native composer:2 image for GitLab CI/CD

Steps to Reproduce (for bugs)

  1. use GitLab CI/CD with image thecodingmachine/php:8.3-v4-cli-node16
  2. as command perform a 'composer install'

Context

As a test on GitLab CI/CD , I want to use only one image for my jobs.

Your Environment

  • Version used: thecodingmachine/php:8.3-v4-cli-node16

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions