git extensions–syntax error near unexpected token

gitExtensions  GitExtensions is a GUI, Visual Studio plugin and shell extensions for Git.

Problem :

Whenever you use newly installed GitExtensions to pull ne repo from remote repo you may face below error.

Syntax error near unexpected token ‘(‘

Below is full error log :

"C:\Program Files (x86)\Git\bin\git.exe" push --recurse-submodules=check 
--progress "origin" refs/heads/master:refs/heads/master
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" 
get: -c: line 0: syntax error near unexpected token `('
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" 
get: -c: line 0: `\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" get'
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" 
erase: -c: line 0: syntax error near unexpected token `('
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" 
erase: -c: line 0: `\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" erase'
fatal: Authentication failed for 'https://<username><username>/<repo>.git/'

Solution :
The problem is syntax error in default gitconfig file. You can find default config file in C:\Users\<UserName>\gitconfig
Try to find entry below for [credential] section. It looks like below 

     helper = !\\\”C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\\\”

Notice the 3 slashes after ! in the start of entry and 3 slashes at the end of the entry. Remove two unnecessary slashes so it will look like this :

     helper = !\”C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\”

Go and run your command again, it should work.


  • ATauenis

    The other way is to run “C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe” manually, answer “yes” and, viola, the helper’s path in the .gitignore is replaced to a good.

  • christoph

    Thanks for your post, Mahin. This really helped me a lot with solving several weird issues with git extensions.

  • Mahin Gupta

    Welcome Christoph. GitExtensions is great tool, but unpolished as normal case with open source software.