[ISSUE] `git push` keep asking for username when the global config already configured (wincred)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Git,

Accidentally have found the issue when the Git is properly installed (git-scm.com) and configured over the global config under Window 8.
Btu if try to use the Cygwin (cygwin.com) installation for the Bash interpreter like this from the `myscript.bat`:

myscript.bat -> myscript.sh -> `git push ...`

Then the git asks for the username.

If directly run the command `git push ...`, then it works as expected without the username prompt.

The issue is around the HOME variable behind the Cygwin installation, when the Git thinks the configuration is in the Cygwin, instead of in the Windows users folder.

The workaround can be something like this:

```bash
  # WORKAROUND:
  #   The `git push` asks for username under the bash shell call from the Windows cmd.exe script.
  #
  [[ -n "${COMSPEC+x}" ]] && unset HOME
```

>git --version
git version 2.43.0.windows.1

>winver
Version 6.2 (Build 9200)





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux