Repository navigation
Description
Describe the Bug
Git Graph overrides an existing GIT_ASKPASS environment variable with its own AskPass implementation when spawning Git commands.
This breaks authentication in environments where GIT_ASKPASS is intentionally provided by the remote development environment.
In my case, I am using Coder with GitHub External Auth. Coder provides:
GIT_ASKPASS=/.coder-agent/coder
Git operations executed from the integrated terminal authenticate successfully, but the same write operation executed from Git Graph prompts for a GitHub username and password and then fails with:
remote: No anonymous write access.
fatal: Authentication failed for
I confirmed the cause by patching Git Graph so that the spawned Git process no longer overrides the existing GIT_ASKPASS. After that change, Git Graph write operations authenticate successfully.
Steps to Reproduce
Steps to reproduce the behaviour:
-
Use VS Code in a remote environment where Git authentication is provided through an existing GIT_ASKPASS environment variable.
-
Verify that the variable is present. In my environment:
GIT_ASKPASS=/.coder-agent/coder -
Run a Git write operation such as git push from the integrated terminal and verify that it succeeds.
-
Perform an equivalent write operation from Git Graph, for example pushing changes or deleting a remote branch.
-
Git Graph displays VS Code prompts asking for a username and password.
-
Authentication fails, for example:
remote: No anonymous write access.
fatal: Authentication failed -
Git Graph creates its own AskPass IPC socket, for example:
/tmp/git-graph-askpass-XXXXXXXX.sock -
Patch Git Graph here so that the spawned Git process inherits process.env without overriding GIT_ASKPASS.
-
Reload VS Code and repeat the Git Graph write operation.
-
The operation succeeds without prompting for a username or password.
Expected Behaviour
If GIT_ASKPASS is already defined in the extension host environment, Git Graph should preserve it instead of unconditionally replacing it with its own AskPass implementation.
Git Graph's integrated AskPass should only be used when no external GIT_ASKPASS has already been provided.
Environment
- Git Graph Extension Version: 1.30.0
- Visual Studio Code Version: 1.128.0-insider
- Operating System: Ubuntu Linux 24.04.4 LTS (Dev Container in Coder workspace)
Activity