Skip to content

Desktop App Fetch/Pull from origin hangs indefinitely #22863

Open

Description

@ShaneTWright

The problem

When using the desktop app, any attempt by it to fetch or pull from origin will hang and spin indefinitely. Quitting the app while this is hanging will occasionally cause an issue which makes command line commands hang as well. I've found a temp solution for fixing the command line when this happens, but not the desktop app.

Release version

Github Desktop versions 3.4.19, 3.6.4, & 3.6.5

Operating system

macOS Tahoe 26.6.2

Steps to reproduce the behavior

I am authenticating with SSH. While I'm not sure if this is part of the cause, it definitely relates to some side effects that can occur.

  1. Open the app.
  2. Either click the "fetch" button or let it try and fetch on its own.
  3. It hangs and spins indefinitely.

This happens regardless of repo, branch, etc.

See the "Additional Context" below for more details and information about side effects.

Log files

Screenshots

Github.Desktop.Fetch.Hangs.mov

Additional context

More Detailed Versions and Computer/User information

  • macOS Tahoe 26.6.2
  • M5 Pro
  • Github Desktop 3.4.19, 3.6.4, & 3.6.5 (tried on each)
  • My user is not an admin of the computer
  • I'm authenticating via ssh.
  • Terminal is running zsh

More Explanation

  • Running ssh -T [email protected] in terminal before opening github desktop works fine, as does git fetch, git pull origin main, git switch <branch> and everything else I've tried.
  • When I open the app and it starts trying to fetch origin, it just hangs indefinitely.
  • Logs show nothing (see attached).
  • Have to quit the app to get it to stop, though it auto tries shortly after re-openning the app.
  • Sometimes (I've not found a clear pattern for when) after I have closed the app to stop the indefinite fetch, running commands that touch the server in terminal will also hang indefinitely as well.
    • Once this happens, every non-local command I run in terminal will consistently hang indefinitely. This will persist even through a complete computer restart.
    • ctrl + C will successfully stop the hung command. Terminal continues to work successfully, and I can see the process for the command stop in activity monitor after a couple seconds, so I don't think the command is continuing to run in the background like a zombie.
    • Running ssh -Tvvv [email protected] once non-local terminal commands have started to hang will show that the last thing to happen before it hangs is ssh_get_authentication_socket_path: path '/var/run/com.apple.launchd.<uniq_value>/Listeners' (see full output attached).

To be clear, I have never gotten the desktop app to successfully fetch from origin on this computer, regardless of which of the app version I've used. To clone repos locally, I had to use the command line.

Fixing the Terminal Commands

I can get the commands in terminal to stop hanging by unsetting the SSH_AUTH_SOCK environment variable. But that has no effect on the desktop app. For the time being, I have added a command to my ~/zshrc file to unset this variable so I can quickly clear the issue if needed.

Things IT and I have Already Tried

  • Restarting the app, including confirming that all processes have quit through activity monitor
  • Restarting the computer
  • Reinstalling (including clearing the ~/Library/Application Support/Github Desktop directory)
  • Different desktop app versions (3.4.19, 3.6.4, & 3.6.5)
  • Installing in the global Applications directory (/Applications) and in an Applications directory local to my user (~/Applications)
  • Installing as admin and installing as my user (to avoid potential permission/ownership issues)
  • I have verified that we don't have case sensitive duplicates of branch names using the methods from this issue report

Activity

  1. desktop-triage commented on Sep 15, 2026

    @desktop-triage

    Triage summary: This is a reproducible bug report (fetch/pull hangs indefinitely, confirmed across three Desktop versions on macOS with SSH auth) rather than an enhancement or support question. No duplicate was found after searching for related fetch-hang, SSH, and SSH_AUTH_SOCK issues in this repo. Suggesting bug and macOS labels; priority is uncertain since it appears tied to a specific SSH-agent/environment interaction rather than affecting all SSH users.

    Initial hypothesis: Desktop routes SSH operations through getSSHEnvironment() in app/src/lib/ssh/ssh.ts#L44-L51, which sets SSH_ASKPASS/DISPLAY and, outside of the Windows-OpenSSH and macOS-dev-build cases, otherwise inherits the process environment (including SSH_AUTH_SOCK) unchanged when spawning ssh/git. The reporter's own workaround — unsetting SSH_AUTH_SOCK — fixes hangs in their terminal, and their ssh -Tvvv trace shows the hang occurring specifically at ssh_get_authentication_socket_path, i.e. while establishing the connection to whatever SSH_AUTH_SOCK points to (their notes suggest a launchd/keychain agent socket becoming unresponsive). Since Desktop does not override or bypass this variable for its own git subprocess environment, if SSH_AUTH_SOCK on their system points to a stalled/unhealthy agent socket, Desktop's underlying ssh invocation would hang the same way manual ssh calls do once that socket state occurs — explaining why fetch never returns even though logs show nothing (Desktop is simply waiting on the OS-level SSH handshake). This is a hypothesis based on the reporter's own diagnostic evidence and the observed environment-inheritance behavior; it doesn't yet explain why a hung terminal command would only start occurring after quitting a hung Desktop fetch, so further investigation should confirm whether Desktop's SSH trampoline process leaves the shared agent socket connection in a bad state on quit.

    Generated by Issue Triage (skills-driven) for #22863 · auto · 56.3 AIC · ⌖ 1.17 AIC · ⊞ 8.1K · ◷

  2. added
    bug
    macOS
    investigation-needed
    priority-3
    more-info-needed
    and removed on Sep 15, 2026
  3. niik commented on Sep 15, 2026

    @niik
    Member

    Thanks for the detailed report and diagnostics! The hung SSH trace is particularly helpful: the connection and key exchange complete, but SSH stops when it attempts to access the launchd-managed agent through SSH_AUTH_SOCK. Since unsetting SSH_AUTH_SOCK restores terminal operations, we’d like to isolate whether Desktop is also hanging while waiting on that agent socket.

    Could you temporarily add the following to ~/.ssh/config, fully quit and reopen GitHub Desktop, and then try fetching again?

    Host github.com
      IdentityAgent none

    Please let us know whether that changes the behavior. After testing, you can remove those lines to restore your existing SSH configuration.

    Could you also share the sanitized output of the following command? Please redact usernames, local paths, key filenames, hostnames, and other sensitive values as needed.

    ssh -G github.com | grep -E "identityagent|identityfile|identitiesonly|addkeystoagent|usekeychain"

    Finally, please share a sanitized copy of the relevant Host github.com section from ~/.ssh/config, if one exists, and let us know whether your organization installs any endpoint-security, credential-management, or SSH-agent software on this managed Mac.

    This currently looks like SSH is waiting indefinitely for the macOS agent rather than reaching Desktop’s passphrase prompt. Desktop then continues waiting because the Git process never exits, which explains both the spinner and the absence of a Git error in the logs.

  4. ShaneTWright commented on Sep 15, 2026

    @ShaneTWright
    Author

    Could you temporarily add the following to ~/.ssh/config, fully quit and reopen GitHub Desktop, and then try fetching again?

    Fetch within the desktop app seems to have worked just fine with that change.

    Could you also share the sanitized output of the following command? ...

    Git ssh -G output.rtf

    Finally, please share a sanitized copy of the relevant Host github.com section from ~/.ssh/config, if one exists [...]

    Host github.com
      AddKeysToAgent yes
      UseKeychain yes
      IdentityFile ~/.ssh/id_ed#####

    [...] let us know whether your organization installs any endpoint-security, credential-management, or SSH-agent software on this managed Mac.

    Yes, we use Privilege Manager by Delinea to manage local admin permissions. Netskope is our webfilter tool. CrowdStrike is our antivirus tool.

    This currently looks like SSH is waiting indefinitely for the macOS agent rather than reaching Desktop’s passphrase prompt. Desktop then continues waiting because the Git process never exits, which explains both the spinner and the absence of a Git error in the logs.

    Would that explain the commands through terminal occasionally getting stuck and not recovering until the SSH_AUTH_SOCK is cleared?

  5. removed
    more-info-needed
    on Sep 15, 2026
  6. ShaneTWright commented on Sep 22, 2026

    @ShaneTWright
    Author

    @niik Do you need/want me to try anything else or gather any more information?

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

    buginvestigation-neededmacOSpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions