Getting error when working on git for Windows 10

Hi,

I tried to run the below command, but I am getting an error:

git config --global user.name “Reshmi”
warning: unable to access ‘JAVA_HOME;c:/Reshmi/GitRepo;c:/ProgramData/Git;c:/Reshmi/GitRepo/myfirstrepo;/.gitconfig’: Invalid argument

I put my git path on my windows HOME variable. Still no success.

After git is installed, I was able to run git clone successfully. But I’m unable to commit anything because the git config to set user name is failing. 

Any help is appreciated.

I’m not sure what environment variable you changed, but it appears to be incorrectly formatted. Typically on Windows, a path-style environment variable consists of semicolon-separated paths to search. Often some of those paths are supplied by other environment variables, these are “escaped” by surrounding them with percent signs %, for example %ENVVAR%. It appears that perhaps JAVA_HOME is one such variable but written incorrectly so that the path breaks the traditional format and makes Git interpret that string in the error message as a command. So I would recommend checking your environment variables and ensuring they are all properly formatted.

I hope that helps!