Skip to content

safeoutputs-push_to_pull_request_branch fails on fetch #18703

Closed

Description

@AlexanderWert

The safeoutputs-push_to_pull_request_branch step in the agent job fails with: `Cannot generate incremental patch: failed to fetch ***

Safe Outputs MCP Server Logs:

Safe Outputs MCP Server Log
Start time: Fri Feb 27 13:45:03 UTC 2026
===========================================

...

[2026-02-27T13:46:56.055Z] [safeoutputs] Calling handler for tool: push_to_pull_request_branch
[2026-02-27T13:46:56.060Z] [safeoutputs] Using current branch for push_to_pull_request_branch: article/abcdefgh-634-20230227-b93ea53335bed345
[2026-02-27T13:46:56.060Z] [safeoutputs] Generating incremental patch for push_to_pull_request_branch with branch: article/abcdefgh-634-20230227-b93ea53335bed345
[generate_git_patch] Starting patch generation: mode=incremental, branch=article/abcdefgh-634-20230227-b93ea53335bed345, defaultBranch=main
[generate_git_patch] Environment: cwd=/home/runner/work/my-repo/my-repo, GITHUB_SHA=ec12debf24c77b128445bes895289bd512eec4a8
[generate_git_patch] Strategy 1: Checking if branch 'article/abcdefgh-634-20230227-b93ea53335bed345' exists locally
[debug] Executing git command: git show-ref --verify --quiet refs/heads/article/abcdefgh-634-20230227-b93ea53335bed345
[debug] Git command completed successfully with no output
[generate_git_patch] Strategy 1: Branch 'article/abcdefgh-634-20230227-b93ea53335bed345' exists locally
[generate_git_patch] Strategy 1 (incremental): Fetching origin/article/abcdefgh-634-20230227-b93ea53335bed345
[debug] Executing git command: git fetch origin -- article/abcdefgh-634-20230227-b93ea53335bed345:refs/remotes/origin/article/abcdefgh-634-20230227-b93ea53335bed345
[error] Git command failed: git fetch origin -- article/abcdefgh-634-20230227-b93ea53335bed345:refs/remotes/origin/article/abcdefgh-634-20230227-b93ea53335bed345
[error] Exit status: 128
[error] Stderr: fatal: could not read Username for 'https://github.com': No such device or address

[generate_git_patch] Strategy 1 (incremental): Fetch failed - ERR_SYSTEM: fatal: could not read Username for 'https://github.com': No such device or address

[2026-02-27T13:46:56.185Z] [safeoutputs] Patch generation failed: Cannot generate incremental patch: failed to fetch origin/article/abcdefgh-634-20230227-b93ea53335bed345. This typically happens when the remote branch doesn't exist yet or was force-pushed. Error: ERR_SYSTEM: fatal: could not read Username for 'https://github.com': No such device or address

[2026-02-27T13:46:56.185Z] [safeoutputs] Handler returned for tool: push_to_pull_request_branch

Activity

  1. locked and limited conversation to collaborators on Feb 27, 2026
  2. unlocked this conversation on Feb 27, 2026
  3. added
    bug
    on Mar 1, 2026
  4. locked and limited conversation to collaborators on Mar 2, 2026
  5. unlocked this conversation on Mar 2, 2026
  6. deleted a comment from samuelkahessay on Mar 5, 2026
  7. pelikhan commented on Mar 5, 2026

    @pelikhan
    Collaborator

    @copilot ensure that we are using the github enterprise endpoint in this handler.

  8. AlexanderWert commented on Mar 6, 2026

    @AlexanderWert
    Author

    @pelikhan

    Thanks for looking into this.

    I just tried release 0.53.4 and the exact same problem is still happening.
    Can we reopen this issue?

  9. locked and limited conversation to collaborators on Mar 6, 2026
  10. unlocked this conversation on Mar 6, 2026
  11. AlexanderWert commented on Mar 6, 2026

    @AlexanderWert
    Author

    For context:

    In the workflow where I hit this, I'm running it with this setting:

    safe-outputs:
      github-app:
        app-id: ${{ secrets.APP_ID }}
        private-key: ${{ secrets.APP_PEM }}
    
  12. locked and limited conversation to collaborators on Mar 6, 2026
  13. unlocked this conversation on Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcommunity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions