[GitExtensions] git extensions–syntax error near unexpected token

Original post from : http://mahingupta.com/git-extensionssyntax-error-near-unexpected-token/

Copy just in case.

Problem :

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

Syntax error near unexpected token ‘(‘

Below is the 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://@bitbucket.org//.git/’

Solution :
The problem is syntax error in default gitconfig file. You can find default config file in C:\Users\\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 ! at the beginning and the 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.