Posts Tagged With ‘gitextension’


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>@bitbucket.org/<username>/<repo>.git/'
Done

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 

[credential]
     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 :

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

Go and run your command again, it should work.

Regards