On Friday, August 3, 2012 4:56:11 PM UTC+2, coccinelle wrote: > > Hi, > > I'm new to Git and I struggle already at the first configuration: > > git config --global user.name "My Name" > gives > error: could not lock config file c://.gitconfig: Permission denied > > First thing to notice: the config file is not located directly in C:, but > in C:\Program Files\Git\etc. > I can edit it manually without any problems, so my user account has a > write permission. > I would not mind simply editing the file manually, but I got the same > error message later when I wanted to clone a project using the Git Gui. > This doesn't happen if I clone using Git Bash. > > I'm working on a Windows XP machine. I installed Git on a second machine > but I didn't get the error. > Any ideas?
I haven't got Windows XP here, so I can't really try out much. Any configuration that you have in C:\Program Files\Git\etc comes in * addition* to the .gitconfig in your home-directory. On Windows 7, my .gitconfig ends up in my home-dir in C:\Users\tfnico\.gitconfig On XP, I imagine it should go in C:\Documents and Settings\tfnico\.gitconfig I'm not really sure how msysgit decides on where your home-dir is, and why it doesn't work on your machine. I would guess that C:\.gitconfig is the final location it falls back to. There are some hints in this post: http://stackoverflow.com/questions/2114111/where-does-git-config-global-get-written-to - perhaps you can look at the contents of C:\Program Files\Git\etc\profile and see what the HOME variable is configured to be. Then try echo'ing this expression in your commandline. For example: echo %HOMEDRIVE%%HOMEPATH% Could be that you have to replace that expression with something that works on your machine. This comment <http://stackoverflow.com/a/5732395/266875>on the above mentioned post explains a similar issue. Also, please tell us what version of Git you've got installed: git --version -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/O77vBUHVopYJ. To post to this group, send email to firstname.lastname@example.org. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.