Skip to content

CI: Smoke Chroot fails with .copilot/pkg permission denied #542

@Mossaka

Description

@Mossaka

Summary

Smoke Chroot workflow fails because the Copilot CLI can't create ~/.copilot/pkg:

Error creating package directory: /home/runner/.copilot/pkg/linux-x64/0.0.402
Failed to extract bundled package: Error: EACCES: permission denied, mkdir '/home/runner/.copilot/pkg'

Root Cause

The install_copilot_cli.sh script runs with sudo, creating /home/runner/.copilot owned by root. When the Copilot CLI later runs as runner user, it can't write to the directory.

Fix

Add a step to smoke-chroot.md that pre-creates the directory with correct ownership:

steps:
  - name: Fix Copilot CLI directory permissions
    run: mkdir -p /home/runner/.copilot && sudo chown -R runner:runner /home/runner/.copilot

This was previously fixed in PR #530 but was reverted as part of the intercept mode revert (#541).

Affected Workflow

Additional Context

This is independent of the intercept mode changes. It's a chroot-specific issue where the Copilot CLI install script creates directories with root ownership that the runner user can't access.

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