Andrew Bullock
Andrew Bullock

Reputation: 37406

git global config issue

Somehow, my global git (msysgit) settings for user.name and user.email (and god knows what else) are set to a recent ex-colleague's details.

When I try and change them i get could not commit to u://.gitconfig

If I try and create u://.gitconfig through git bash then i get permission denied.

C:\Users\<My Username>\

contains no references to git.

I've tried uninstalling, searching the registry and my file system for all references to git and I can't find any (windows file search is crap though).

What the hell is going on? Why even after reinstalling are this guys details still the global settings???

Thanks

Upvotes: 7

Views: 8984

Answers (2)

Bruno
Bruno

Reputation: 11

I got the same error, but the issue was that my HOME disk was full.

Upvotes: 1

VonC
VonC

Reputation: 1329212

The global gitconfig is store at the $HOME location (in the Git bash session).
Is it possible you have a $HOME (or %HOME% in DOS session) referencing u:\.

If so, simply set HOME=%HOMEPATH% (if you have HOMEPATH defined like in Windows 7), and you should be able to resume accessing/updating your global Git configuration.


The OP adds:

my %HOMEPATH% is set to \, will setting HOME to that help?

Well actually no, since HOME is not a environment variable usually set by Windows (Xp, Vista or 7).

fixed it, awesome, set HOME to c:\users\me

That is the right fix, although fixing HOMEPATH (even if that doesn't directly involve Git) would be also advisable (it shouldn't refer to u:\).

Upvotes: 7

Related Questions