Pipeline PHP Composer VCS download failure

We are using a Docker image to build our WordPress theme for our website.

image: misterio92/ci-php-node

pipelines:
  branches:
    develop:
      - step:
          name: Deploy Development
          deployment: test
          caches:
            - node
            - composer
          script:
            - echo "{\"http-basic\":{\"composer.deliciousbrains.com\":{\"username\":\"$DELICIOUS_BRAINS_USERNAME\",\"password\":\"$DELICIOUS_BRAINS_PASSWORD\"}}}"  > auth.json
            - composer install
            - git add wp-content/plugins -f
            - cd "wp-content/themes/theme"
            - npm install
            - npm run build
            - cd "/opt/atlassian/pipelines/agent/build"
            - mv .gitignore .gitignore-old
            - mv .gitignore-build .gitignore
            - git status
            - git add .
            - git commit -m "deployment"
            - git remote -v
            - git fetch --unshallow origin
            - git push -f $GIT_REPO develop
            - echo "Develop check"
...

We pull in a couple of PHP composer packages and one from a Github repository GitHub - studiopress/genesis-connect-woocommerce: Core plugin for developing WooCommerce integration . The one from the repository builds but only leaves us with an empty plugin directory

{ 
  "repositories": [
    {
      "type": "composer",
      "url": "https://wpackagist.org"
    },
    {
      "type":"composer",
      "url":"https://composer.deliciousbrains.com"
    },
    {
      "type": "vcs",
      "url": "git@github.com:studiopress/genesis-connect-woocommerce.git"
    }
  ],
  "require": {
    "deliciousbrains-plugin/wp-migrate-db-pro": "*",
    "studiopress/genesis-connect-woocommerce": "dev-develop",
    "wpackagist-plugin/ajax-load-more": "*",
    "wpackagist-plugin/printful-shipping-for-woocommerce":"*",
    "wpackagist-plugin/user-switching": "*",
    "wpackagist-plugin/woocommerce": "^6.6"
  },
  "extra": {
    "installer-paths": {
      "wp-content/plugins/{$name}/": [
        "type:wordpress-plugin"
      ]
    }
  }
}

Things seems to build well:

Build setup
37s
echo "{\"http-basic\":{\"composer.deliciousbrains.com\":{\"username\":\"$DELICIOUS_BRAINS_USERNAME\",\"password\":\"$DELICIOUS_BRAINS_PASSWORD\"}}}" > auth.json
<1s
composer install
2s
+ composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 7 installs, 0 updates, 0 removals
  - Downloading composer/installers (v1.12.0)
  - Downloading deliciousbrains-plugin/wp-migrate-db-pro (2.3.3)
  - Syncing studiopress/genesis-connect-woocommerce (dev-develop 2ac4dfe) into cache
  - Downloading wpackagist-plugin/ajax-load-more (5.5.2)
  - Downloading wpackagist-plugin/printful-shipping-for-woocommerce (2.1.33)
  - Downloading wpackagist-plugin/user-switching (1.5.8)
  - Downloading wpackagist-plugin/woocommerce (6.6.0)
 0/6 [>---------------------------]   0%
 1/6 [====>-----------------------]  16%
 2/6 [=========>------------------]  33%
 3/6 [==============>-------------]  50%
 4/6 [==================>---------]  66%
 5/6 [=======================>----]  83%
 6/6 [============================] 100%  - Installing composer/installers (v1.12.0): Extracting archive
  - Installing deliciousbrains-plugin/wp-migrate-db-pro (2.3.3): Extracting archive
  - Installing studiopress/genesis-connect-woocommerce (dev-develop 2ac4dfe): Cloning 2ac4dfe559 from cache
  - Installing wpackagist-plugin/ajax-load-more (5.5.2): Extracting archive
  - Installing wpackagist-plugin/printful-shipping-for-woocommerce (2.1.33): Extracting archive
  - Installing wpackagist-plugin/user-switching (1.5.8): Extracting archive
  - Installing wpackagist-plugin/woocommerce (6.6.0): Extracting archive
 0/5 [>---------------------------]   0%
 2/5 [===========>----------------]  40%
 4/5 [======================>-----]  80%
 5/5 [============================] 100%
Generating autoload files
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!
git add wp-content/plugins -f
1s
cd "wp-content/themes/theme"
<1s
npm install
12s
npm run build
6s
cd "/opt/atlassian/pipelines/agent/build"
<1s
mv .gitignore .gitignore-old
<1s
mv .gitignore-build .gitignore
git status
<1s
git add .
<1s
git commit -m "deployment"
<1s
git remote -v
<1s
git fetch --unshallow origin
8s
git push -f $GIT_REPO develop
34s
echo "Develop check"
<1s
Build teardown

But the Github based plugin is never added with content, only an empty directory. Cleaning composer cache before installation did not work either. Any idea why an empty directory is added instead of the StudioPress Genesis Connect for WooCommerce plugin? Any ideas how to debug?

I needed the plugin to be installed as an archive and not another git repository. Because I did try to add it as another repository I got an empty repository. Only did not see the warning on copying the plugins initially. I was suggested to add it as a submodule if I really wanted to add it as a repo. I did not. So I added this to composer file

"config": {
    "preferred-install": {
        "studiopress/genesis-connect-woocommerce": "dist"
    }
  }

and that solved the issue. This way it is added as an archive.