Closed james-duvall closed 3 years ago
It may be reading from getpwent instead. https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch (your environment would normally only be loaded post-authentication)
For your case, set/add db_home: /c/Users/%U
to /etc/nsswitch.conf
@jeremyd2019
Wow, thanks for the quick response. This worked perfectly. I will look into the link you posted.
You might also be able to use db_home: windows
, assuming your user profile is the same as your home directory (it may not be if you are a domain user).
Thanks for pointing me to the nsswitch information. This solved my issue. There seems to be inconsistency between how various components of msys2 use environment variables and the nsswitch to find HOME and other user data.
both db_home: windows
and db_home: /%H/%U
seem to work for me.
Hi, I'm having an issue with ssh not finding my home directory. It seems to be looking in
/home
when it should be looking in/c/Users/
I have
$HOME
set to/c/Users/duvall_jw
,cd ~
seems to work correctly in bash, and other programs such as vim and nano don't have any issues finding my home directory or loading their dotfiles.Below is the content of
ssh -v git@gitlab
. You can see that it is looking in/home/duvall_jw
.As a workaround, I can make ssh work correctly by copying
~/.ssh
to/home/duvall_jw/.ssh
, but this isn't a great solution since this is the only program using that directory.Is there possibly some bug where ssh is not reading the environment correctly?