Git credentials are not remembered inside dev container

Describe the Bug

Ever since switching to the Anyshpere dev container extension, I have to re-enter my git credentials for every single git action I run (fetching, switching branches, merging, etc).
This was not the case with the microsoft dev containers extension.

I am using Windows 11 with Git for windows and the windows git credentials helper.

Normally, the git credentials are shared with the dev container and I never have to re-enter my git credentials (or at most once after building a fresh new container).

This makes using dev containers with git basically unusable, as having to reenter my credentials every couple of minutes is not a viable solution.

Steps to Reproduce

Connect to WSL
Open a dev container
Do any git action on a self hosted git instance

Expected Behavior

I expect my git credentials to be remembered and not have to re-enter them for every single got action I do.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4 (user setup)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T17:09:01.383Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100
Anysphere Dev Container Extension Version 1.0.13

Does this stop you from using Cursor

Yes - Cursor is unusable

4 Likes

Hi @Elwin, thanks for reporting this issue. We are looking into it.

Is there any update to this?

I am unable to use cursor because of this issue, as I have to re-enter my git credentials for every single git command I do inside of my dev container.

My gut feeling is that this has to do with the Windows Credentials Manager that stores my Git information, but it’s hard to confirm that.
All I know is that VSCode with the microsoft extensions works perfectly fine with it, so that’s what I am forced to use while this issue is being resolved :slight_smile:

Hi @Elwin, we don’t support forwarding custom git credentials into the container. This is a feature that we are looking at supporting, though we do not have a timeline for it yet.

There are a few workarounds I’d suggest:

  1. If you’re on GitHub / GitLab, I’d recommend installing the official plugin for that, and authenticate in the editor. This should inject your credentials directly into the remote environment.
  2. If you can use an SSH key, we support SSH agent forwarding.
  3. Inside your container, could you manually configure the credential helper? You could configure a post-attach command to prompt for your password and initialize the git credential helper inside the container, so you’d only need to enter it once.

I have the same issue here.
Those workarounds are big step backwards. Before you switch to that anywhere stuff, everything worked fine and the same in cursor and in vscode. With that workaround me and my colleagues have to remember different handlings in different IDE’s. Using the credential manager makes the life with gitlab so much easier, you should support this as fast as possible.
At least i would like to see that there is any kind of hint, why this doesn_t work. It took me hours to find the reason.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.