0

I am not able to set my Git credentials

$ git config --global user.name "Akshy,Sash"
error: could not lock config  file C:/User/Sash/$USERPROFILE%/.gitconfig 

I am able to set it using command prompt but when I use Git Bash I get the "could not lock config" error.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
codrare
  • 1
  • 1
  • look at this answer: https://stackoverflow.com/questions/14959972/trouble-setting-up-git-with-my-github-account-error-could-not-lock-config-file – Ali Zedan Feb 20 '23 at 09:59
  • Does this answer your question? [Trouble setting up git with my GitHub Account error: could not lock config file](https://stackoverflow.com/questions/14959972/trouble-setting-up-git-with-my-github-account-error-could-not-lock-config-file) – Ali Zedan Feb 20 '23 at 09:59
  • Even if I try to follow those steps I get /h/%USERPROFILE%/.git:No such file or directory – codrare Feb 20 '23 at 10:02
  • Then you should give more details. – Ali Zedan Feb 20 '23 at 10:51
  • I am able to set user,name and user.email using command prompt but not able to do it with git bash,but if i do it with cmd it is not set globally by and every time i try to push a code it says username ,useremail not present – codrare Feb 20 '23 at 11:27
  • and git config -l does not list my user.name or user.email – codrare Feb 20 '23 at 11:28
  • Check this : https://github.com/rprichard/wslbridge/issues/32 – Ali Zedan Feb 20 '23 at 15:37

0 Answers0