Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git operation hangs due to empty string in $GIT_ASKPASS #136837

Closed
lszomoru opened this issue Nov 10, 2021 · 4 comments
Closed

Git operation hangs due to empty string in $GIT_ASKPASS #136837

lszomoru opened this issue Nov 10, 2021 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release git GIT issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@lszomoru
Copy link
Member

Copied from #121231 (comment)

Here's what I found was happening on my machine:

$ cat $GIT_ASKPASS
#!/bin/sh
VSCODE_GIT_ASKPASS_PIPE=`mktemp`
ELECTRON_RUN_AS_NODE="1" VSCODE_GIT_ASKPASS_PIPE="$VSCODE_GIT_ASKPASS_PIPE" "$VSCODE_GIT_ASKPASS_NODE" "$VSCODE_GIT_ASKPASS_EXTRA_ARGS" "$VSCODE_GIT_ASKPASS_MAIN" $*
cat $VSCODE_GIT_ASKPASS_PIPE
rm $VSCODE_GIT_ASKPASS_PIPE

$ export | grep VSCODE_GIT_ASKPASS_EXTRA_ARGS
declare -x VSCODE_GIT_ASKPASS_EXTRA_ARGS=""

This means that $GIT_ASKPASS is passing the empty string as the first positional argument to node, which causes it to launch a REPL instead of running the script $VSCODE_GIT_ASKPASS_MAIN.
My workaround is export VSCODE_GIT_ASKPASS_EXTRA_ARGS="--title=foobar" but the proper bugfix should happen in VSCode's GIT_ASKPASS implementation.
This bug appears to have been introduced by this security bugfix: ac29daa

@lszomoru lszomoru added git GIT issues bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release labels Nov 10, 2021
@lszomoru lszomoru added this to the October 2021 Recovery 2 milestone Nov 10, 2021
@Pixelao
Copy link

Pixelao commented Nov 10, 2021

I experience the same problem, from the moment ac29daa been released.
Working through remote ssh the git processes stay open, without anything happening.

@arifszn
Copy link

arifszn commented Nov 11, 2021

Still facing this issue on WSL.

@gjsjohnmurray
Copy link
Contributor

Will be fixed in upcoming 1.62.2. Meanwhile a workaround is to disable auto-updates and then manually downgrade to 1.62

@phil-opp
Copy link

I can confirm that this is fixed after updating to 1.62.2 (#136841).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release git GIT issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants
@deepak1556 @phil-opp @lszomoru @gjsjohnmurray @Pixelao @alexr00 @arifszn and others