Getting error when trying to log into hugging face account


I am unable to log into hugging face account using the command line. The command I used

huggingface-cli login

The error I am facing,

File "E:\env\lib\site-packages\huggingface_hub\", line 268, in write_to_credential_store
    with subprocess.Popen(
  File "C:\Python\Python3.10.0\lib\", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python\Python3.10.0\lib\", line 1435, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Asking for a quick fix from the community. Thank you


I had this issue until I installed git for windows.
Once I installed git and restarted my PC this error went away.