Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Git Credential Helper Not Working in Dev Container
Problem Summary
The Git credential helper configured by Cursor fails to authenticate Git operations in Dev Container environments. Git operations fall back to password authentication, which fails because GitHub no longer accepts passwords. The credential helper cannot communicate with the Cursor server due to a broken IPC socket connection.
Environment Details
- Cursor Version: 2.4.21
- OS: Debian GNU/Linux 12 (bookworm) - running in Dev Container
- Git Version: 2.39.5
- Container Type: Dev Container
Steps to Reproduce
- Open a project in Cursor using a Dev Container
- Sign in to GitHub through Cursor’s GitHub Pull Requests extension
- Attempt to pull/push from terminal:
git pull - Git prompts for password authentication instead of using OAuth
Error Messages
Terminal Output
fatal: could not read Password for 'https://[email protected]/repo.git': No such device or address
Credential Helper Error (when testing directly)
Unable to connect to VS Code Dev Containers extension.
Error in request Error: connect ECONNREFUSED /tmp/vscode-remote-containers-ipc-[uuid].sock
at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/tmp/vscode-remote-containers-ipc-[uuid].sock'
}
Root Cause Analysis
-
Credential Helper Configuration: Git is configured with a credential helper that points to:
/root/.cursor-server/bin/[server-id]/node /tmp/vscode-remote-containers-[uuid].js git-credential-helper -
Missing Environment Variable: The credential helper script requires
REMOTE_CONTAINERS_IPCenvironment variable to be set, but it’s not set in the container environment. -
Stale IPC Socket: The IPC socket file exists (
/tmp/vscode-remote-containers-ipc-[uuid].sock) but connections are refused (ECONNREFUSED), indicating the socket is stale or the server isn’t listening on it. -
Server Mismatch: The credential helper references an old server path (
[old-server-id]) while the actual running server is different ([current-server-id]).
Configuration Details
Git Credential Helper (System Level)
credential.helper=!f() { /root/.cursor-server/bin/[server-id]/node /tmp/vscode-remote-containers-[uuid].js git-credential-helper $*; }; f
IPC Socket File
/tmp/vscode-remote-containers-ipc-[uuid].sock
- Type: Socket file (srwxr-xr-x)
- Last modified: [date] (stale)
- Connection: ECONNREFUSED when attempting to connect
Environment Variables Check
REMOTE_CONTAINERS_IPC: Not set (required by credential helper script)VSCODE_IPC_HOOK_CLI: Set to/tmp/vscode-ipc-[uuid].sock
Attempted Solutions
Signed in through GitHub Pull Requests extension - authentication works for extension features
Reconnected container multiple times - didn’t fix credential helper
Updated credential helper to use current server path - still fails due to IPC connection issue
Manually set REMOTE_CONTAINERS_IPCenvironment variable - connection still refused
Workaround: Installed GitHub CLI (gh) and configured it as credential helper - this works
Expected Behavior
When signed in to GitHub through Cursor’s GitHub Pull Requests extension, Git operations (pull, push, fetch) should automatically use the OAuth token without prompting for credentials.
Workaround
Install GitHub CLI and configure it as the Git credential helper:
# Install GitHub CLI
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list
apt-get update && apt-get install -y gh
# Authenticate
gh auth login
# Configure Git to use GitHub CLI
git config --local credential.helper '!gh auth git-credential'
Additional Notes
- The GitHub Pull Requests extension authentication works correctly
- The issue is specifically with Git CLI operations in terminal
- The credential helper script exists and is executable, but cannot communicate with the Cursor server
- This appears to be a Dev Container-specific issue
Request
Please fix the Git credential helper in Dev Container environments to:
- Properly set the
REMOTE_CONTAINERS_IPCenvironment variable - Ensure the IPC socket connection is active and working
- Update credential helper paths when the server instance changes
- Fall back gracefully or provide better error messages when the credential helper fails
Steps to Reproduce
Steps to Reproduce
- Open a project in Cursor using a Dev Container
- Sign in to GitHub through Cursor’s GitHub Pull Requests extension
- Attempt to pull/push from terminal:
git pull - Git prompts for password authentication instead of using OAuth
Expected Behavior
Expected Behavior
When signed in to GitHub through Cursor’s GitHub Pull Requests extension, Git operations (pull, push, fetch) should automatically use the OAuth token without prompting for credentials.
Operating System
Linux
Version Information
Cursor Version: 2.4.21
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue