Git: Push fails with "could not read Username for 'https://github.com': Device not configured" — credential helper not used when Source Control runs git

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

When I use the built-in Git integration (Source Control → Commit and Push), push fails with:
fatal: could not read Username for ‘https://github.com’: Device not configured
Push from the system Terminal with the same repo works (credentials are stored in macOS Keychain / credential helper).
So the token is valid and the credential helper works when Git is run from a normal terminal.
When Cursor runs git push (e.g. from the Source Control panel), Git does not appear to receive the stored credential and tries to prompt for username/password. Because there is no TTY in that context, the prompt fails with “Device not configured”.
Expected: Cursor’s Git commands (e.g. push) should run in a context where the configured credential helper (e.g. credential.helper=osxkeychain) can provide credentials, so push works without user interaction when credentials are already stored.
Actual: Push from Source Control fails; the same push from Terminal succeeds.
Environment: macOS; remote is HTTPS; credential helper is configured and works in Terminal.
Impact: Users with HTTPS remotes and stored credentials cannot push from the Cursor UI and must use an external terminal.

Steps to Reproduce

do a git commit to a remote repo through cursor git plugin

Operating System

MacOS

Version Information

Version: 2.4.36
VSCode Version: 1.105.1
Commit: f9919bf991f247689f9ead605b5c5a3239a2a790
Date: 2026-02-12T21:00:33.976Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin x64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This looks like a known issue with how Source Control in Cursor starts git processes. In that context, the credential helper doesn’t get proper access to the macOS Keychain.

A couple of workarounds:

  • Option 1: Switch to SSH (recommended long-term fix)
    Switch your remote from HTTPS to SSH. This fully avoids the credential helper:

    git remote set-url origin [email protected]:USERNAME/REPO.git
    

    Make sure you have an SSH key set up for GitHub: Connecting to GitHub with SSH - GitHub Docs

  • Option 2: Use GitHub CLI as the credential helper

    brew install gh
    gh auth login
    git config --global credential.helper '!gh auth git-credential'
    

Quick question: which git binary are you using? Can you run which git in your terminal and share the output? If it’s the Homebrew git, a sandboxing issue might also be involved.

The team is aware of the credential helper issues. Let me know if either workaround helped.

Hey, thank you for your answer, just to confirm that the functionality is working again now after the latest update, so all good!