Git push intermittently fails with "No configured push destination" when remote is not named "origin"

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When a Git repository has a remote named something other than origin (e.g., github), Cursor intermittently fails to push with the error:

Git: fatal: No configured push destination.

This happens even with git config --global push.autoSetupRemote true set. The issue is intermittent — pushing works correctly for weeks, then suddenly breaks without any configuration change. Git CLI push works fine at all times; only Cursor’s built-in Git integration fails.

Steps to Reproduce

  1. Create a Git repo with a remote named something other than origin:
    git remote add github https://github.com/example/repo.git
  2. Ensure push.autoSetupRemote is enabled:
    git config --global push.autoSetupRemote true
  3. Create and check out a new branch
  4. Make a commit and push via Cursor’s Git UI
  5. It will work initially, but after some time (days/weeks), the push will fail with fatal: No configured push destination

Expected Behavior

Cursor should respect the configured remote regardless of its name and should not assume the remote is named origin. Pushing should work consistently as long as a valid remote is configured.

Operating System

MacOS

Version Information

Version: 2.6.14 (Universal)
VSCode Version: 1.105.1
Commit: eb1c4e0702d201d1226d2a7afb25c501c2e56080
Date: 2026-03-08T15:36:54.709Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.1.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. This looks like a bug. In some parts of Cursor’s code, the remote name origin might be hardcoded, so pushing via Source Control sometimes can’t find the push destination even though the CLI works fine.

For now, a workaround is to rename your remote to origin:

git remote rename github origin

A couple of quick questions:

  • How many remotes do you have set up? Please share the output of git remote -v.
  • When pushing breaks, does restarting Cursor fix it, or do you need to do anything else to get it working again?

I’ll pass this to the team. Let me know if the workaround helps.