Skip to content

Using persist-credentials: false leads to could not read Username for 'https://github.com': No such device or address #673

@icemac

Description

@icemac

Describe the bug
Using persist-credentials: false in a private repository for actions/checkout@v4 as suggested by https://github.com/woodruffw/zizmor leads to could not read Username for 'https://github.com/': No such device or address

Workflow used

      - uses: actions/checkout@v4
        with:
          repository: ${{ github.event.pull_request.head.repo.full_name }}
          ref: ${{ github.event.pull_request.head.ref }}
          token: ${{ secrets.COMMIT_ACTIONS_TOKEN }}
...
      - name: Commit changes
        uses: EndBug/add-and-commit@v9
        with:
          committer_name: GitHub Actions
          committer_email: actions@github.com
          message: Version synchronisation
          add: '["toolkit/deps.cfg", "dependabot/requirements.txt"]'

Expected behavior
The documentation suggests to update to actions/checkout@v2 for the error message I saw.
Maybe this just needs to be added to the documentation as another source for this error.

Logs

Run EndBug/add-and-commit@v9

Running in /home/runner/work/...
Add input parsed as string array, running 2 git add commands.
> Using 'dependabot[bot] ' as author.
> Using custom committer info: GitHub Actions 
> Using "Version synchronisation" as commit message.
> Internal logs
  > Staging files...
  > Adding files...
  > No files to remove.
  > Checking for uncommitted changes in the git working tree...
  > Found 1 changed files.
  > Fetching repo...
  Error: Error: fatal: could not read Username for 'https://github.com/': No such device or address

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions