Comfy-Org / Comfy-Org/ComfyUI

update.py: pygit2 remote.fetch() fails with SSH remotes ("unsupported URL protocol")

Open
#12,842 1 comment 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

The updater should fetch latest changes from the ComfyUI repository successfully, regardless of whether the git remote uses HTTPS or SSH.

### Actual Behavior

The updater crashes with "_pygit2.GitError: unsupported URL protocol" because pygit2's remote.fetch() does not support SSH remotes.

Full log:

```
stashing current changes
nothing to stash
creating backup branch: backup_branch_2026-03-08_20_25_03
checking out master branch
pulling latest changes
Traceback (most recent call last):
File "F:\ComfyUI_windows_portable\update\update.py", line 93, in
pull(repo)
~~~~^^^^^^
File "F:\ComfyUI_windows_portable\update\update.py", line 11, in pull
remote.fetch()
~~~~~~~~~~~~^^
File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pygit2\remotes.py", line 245, in fetch
payload.check_error(err)
~~~~~~~~~~~~~~~~~~~^^^^^
File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pygit2\callbacks.py", line 111, in check_error
check_error(error_code)
~~~~~~~~~~~^^^^^^^^^^^^
File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pygit2\errors.py", line 67, in check_error
raise GitError(message)
_pygit2.GitError: unsupported URL protocol
-
This will try to update pytorch and all python dependencies.
-
If you just want to update normally, close this and run update_comfyui.bat instead.
```

Image

### Steps to Reproduce

1. Have a working SSH key setup for GitHub (git@github.com works fine from the system git CLI)
2. Have the ComfyUI remote set to SSH (git remote set-url origin git@github.com:comfyanonymous/ComfyUI.git)
3. Run update_comfyui.bat
4. The updater crashes as shown above

Note: changing the remote back to HTTPS would fix the updater but breaks the user's broader git SSH workflow.

Proposed fix: replace pygit2's remote.fetch() with subprocess.run(['git', 'fetch', ...]) which uses the system git and handles SSH natively, with no impact on HTTPS users.

### Debug Logs

```powershell
.
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.