Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

sourcetree can not find git config

Daniel Schmid 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 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 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 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 September 24, 2019

Great. its working fine.

0 votes
karima khirellah September 12, 2018

Thanks Robert,

It worked fine!

0 votes
Daniel Schmid 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