-
Notifications
You must be signed in to change notification settings - Fork 2.6k
git dot ssh directory location #2016
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
Comments
This is an example of the problem: I've followed that example and it does not work, for example:
And that is the problem - sshkeygen decided to use J drive Bottom line, it appears that although various variables are set |
|
Perhaps there are MULTIPLE places where this needs to be fixed.
This also occurs in various other ssh places. besides libssh
…________________________________
From: Matthias Asshauer <[email protected]>
Sent: Friday, January 11, 2019 9:27:16 AM
To: git-for-windows/git
Cc: Duane Ellis; Author
Subject: Re: [git-for-windows/git] git dot ssh directory location (#2016)
ssh-keygen grabs your homedir from pw->pw_dir<https://github.com/openssh/openssh-portable/blob/master/ssh-keygen.c#L292> where pw is a struct previously returned by getpwuid()<https://github.com/openssh/openssh-portable/blob/master/ssh-keygen.c#L2469>. getpwuid() in MSYS2 gets filled from cached data about your user that was obtained from windows in some way<https://github.com/openssh/openssh-portable/blob/master/ssh-keygen.c#L2469>. I'd assume that MSYS2 does not expect your Home directory to change during a windows user session and thus doesn't handle situations where it does change while MSYS2-based processes are running as graciously as you might expect.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2016 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AQVisRo3sWCdBaZCLw5oaQ9_O-X-yyuWks5vCMl0gaJpZM4Z38_v>.
|
As long as your
(i.e. |
Problem statement:
Case (1) When my machine is issolated from the corporate network, my home directory is: c:\users\NAME
Case (2) When my machine is connected to the corporate network, my home directory is: j:
which is by company policy and those above me will not change this.
This means my "$HOME/.ssh" and thus KEYS dynamically move every time
If I am attached to the network, and open a BASH prompt... HOME = the J drive.
If I detach from the network (ie: go into a conference room with laptop)
Or if I go home at the end of the day ...
When I open my laptop back up and launch a second BASH shell
I will have two different HOME directories.
And for example if there are things in your path, ie: $HOME/bin - and that HOME directory is gone...
painful things happen (extreme sluggish ness, etc)
I have tried setting "HOME=/c/users/NAME" in the file /etc/profile
and if I later use the command: ls -l $HOME it works
But when I launch SSH-KEYGEN or any other SSH tool,
It seems to ignore the HOME variable and tries to search the wrong place for my ssh dir
it is very frustrating.
Suggestions?
The text was updated successfully, but these errors were encountered: