{"thread":{"id":"60646","subject":"[ISSUE] `git push` keep asking for username when the global config already configured (wincred)","startedAt":"2023-12-21T17:34:03Z","lastAt":"2023-12-21T17:34:03Z","messageCount":1,"participants":["Andry"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"485947","messageId":"1585479613.20231221201604@inbox.ru","threadId":"60646","inReplyTo":null,"subject":"[ISSUE] `git push` keep asking for username when the global config already configured (wincred)","fromName":"Andry","fromEmail":"andry@inbox.ru","sentAt":"2023-12-21T16:16:04Z","receivedAt":"2023-12-21T17:34:03Z","isPatch":false,"sender":{"key":"andry@inbox.ru","avatar":null},"body":"Hello Git,\n\nAccidentally have found the issue when the Git is properly installed (git-scm.com) and configured over the global config under Window 8.\nBtu if try to use the Cygwin (cygwin.com) installation for the Bash interpreter like this from the `myscript.bat`:\n\nmyscript.bat -> myscript.sh -> `git push ...`\n\nThen the git asks for the username.\n\nIf directly run the command `git push ...`, then it works as expected without the username prompt.\n\nThe 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.\n\nThe workaround can be something like this:\n\n```bash\n  # WORKAROUND:\n  #   The `git push` asks for username under the bash shell call from the Windows cmd.exe script.\n  #\n  [[ -n \"${COMSPEC+x}\" ]] && unset HOME\n```\n\n>git --version\ngit version 2.43.0.windows.1\n\n>winver\nVersion 6.2 (Build 9200)\n\n"}]}