sourcetree can not find git config

Daniel Schmid
Contributor
August 4, 2014

As soon as I try to open a project in sourcetree on windwos I get the following error

"fatal: unable to access '"C:\Users\<user>"/.config/git/config': Invalid argument"

why I sourcetrree loking in the directory and how to chnage that? My global Git config is on
'"C:\Users\<user>"/.gitconfig'

I tried a lot already any help welcome

5 answers

1 accepted

6 votes
Answer accepted
Robert Kapala
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2014

Hi Daniel,

 

I had the same issue.

To fix it I opened Environment Variables (open Control Panel -> System -> Advanced system settigns, tab: Advanced, click Environment Variables...).

In User variables for <user> had a variable: HOME with value

"c:\Users\&lt;user&gt;"

Replace the value with value:

c:/Users/&lt;user&gt;/

Now should work fine!

 

Cheers,

Robert

 

Linda van Zyl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 6, 2020

You sir, are a star!  I've been having issues with Source Tree not reading my global configuration for some reason and kept creating a local copy of .git that I didn't want.

Adding this Env Variable sorted it out :) 

0 votes
ESC_Q
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2020

How can I solve this issue if I don't have permissions to change system variables or my .gitconfig is not located in the HOME directory?

0 votes
Muthuram Arumuganainar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2019

Great. its working fine.

0 votes
karima khirellah
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 12, 2018

Thanks Robert,

It worked fine!

0 votes
Daniel Schmid
Contributor
December 10, 2014

Hi Robert

Excellent! That worked! 

I was searching for months for a solution to that.

Thx again, Daniel 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events