-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git bash forcing incorrect HOME env #5137
Comments
You could try tracing the startup commands (similar to what is suggested on Git for Windows' wiki to diagnose performance issues). |
The troubleshooting that dealt with the problem was rolling back the git version to one that wasn't broken. |
We just discovered that updating our CI build servers to version 2.47.1 breaks our build process because our customized %HOME% directly is not used when trying to checkout our code using "git clone". The .ssh folder in our customized %HOME% directory has both our Deployment Key and a known_hosts file to authenticate and pull code. It appears no matter what we try to set the %HOME% path too its using /.ssh/known_hosts instead of %HOME%/.ssh/known_hosts and %HOME/.ssh/deploy_key. We also had to revert to the previous version we knew was working 2.43.0.1. Because the known_hosts and key file are not in the "/" folder its trying to load we get this error.
|
Setup
defaults?
to the issue you're seeing?
env (as seen by git-bash):
MSYSTEM=MINGW64
PATH=
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
WINDIR=C:\WINDOWS
TERM=xterm-256color
HOME=/home/ikiris
Details
Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
git-bash
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
something has caused git bash to start forcing the HOME env to /home/$USERNAME instead of what it should be at /c/Users/username, and I cannot for the life of me find what is causing it other than just an update broke things at some point. this worked previously.
i can't find an override in any of the profile files etc, and even forcing via export in session cannot override it.
i've tried switching the nssswitch value to windows as well as forcing HOME env via windows.
you can see my real shell envs here from powershell:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\ikiris\AppData\Roaming
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=133370443822771631
COMMONPROGRAMFILES=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=FEAR
COMSPEC=C:\WINDOWS\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
GOPATH=C:\Users\ikiris\go
HOME=/c/Users/ikiris
HOMEDRIVE=C:
HOMEPATH=\Users\ikiris
LOCALAPPDATA=C:\Users\ikiris\AppData\Local
LOGONSERVER=\SORROW
MSYS2_PATH_TYPE=inherit
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\ikiris\OneDrive
OS=Windows_NT
PATH=/c/Program Files/Python312/Scripts:/c/Program Files/Python312:/c/Program Files (x86)/VMware/VMware Player/bin:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/c/Program Files/Microsoft VS Code/bin:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/ProgramData/chocolatey/bin:/c/Program Files/OpenSSH-Win64:/c/Program Files/dotnet:/c/Program Files/Graphviz/bin:/c/Program Files/Go/bin:/c/Program Files (x86)/WinSCP:/c/Program Files/TortoiseGit/bin:/c/Program Files/Docker/Docker/resources/bin:/c/Program Files/Git/cmd:/c/Users/ikiris/.cargo/bin:/c/WINDOWS/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/c/WINDOWS/system32/config/systemprofile/go/bin:/c/Program Files/Lens/resources/cli/bin:/ucrt64/bin:/usr/bin:/c/Users/ikiris/go/bin:/c/Users/ikiris/AppData/Local/Keybase
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=5e03
ProgramData=C:\ProgramData
PROGRAMFILES=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\Wired Networking
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SSH_AGENT_PID=1551
SSH_AUTH_SOCK=C:/Users/ikiris/AppData/Local/Temp/ssh-pXhYgM4D6XcZ/agent.1550
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=/c/Users/ikiris/AppData/Local/Temp
TMP=/c/Users/ikiris/AppData/Local/Temp
USERDNSDOMAIN=
USERDOMAIN=
USERDOMAIN_ROAMINGPROFILE=
USERNAME=ikiris
USERPROFILE=C:\Users\ikiris
VAULT_ADDR=
WINDIR=C:\WINDOWS
TERM=xterm-256color
because of the above, none of my config files are being applied, breaking the ability to run git commands via git-bash
The text was updated successfully, but these errors were encountered: