-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Ssh-agent stops to work after a while. #862
Comments
Hrm - can you try with 0.20.1? We had some input issues that might be related. |
Woah. The reason is very stupid from my side. 🤦♂️ This is more of a |
wth - that's super weird! No worries at all :) I do recommend upgrading to |
Well, this is still happening but I'd rather do some research and gather some specifics and open new issue with all the details. |
Sure - this is super weird. I am not aware of Zellij doing anything that might be related to this... could it be an environment thing? Some shell stuff that happens on startup that somehow is skipped inside Zellij for you, or? |
well all I do is start run |
Did some digging and this is happening because of the details of how ssh forwarding/ssh agent work. SSH forwarding uses the value of the There is a solution which you can apply to fix this problem without changing anything on the zellij side: On the remote, make the following modifications: if test "$SSH_AUTH_SOCK"; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi ~/.bashrc (or the rc file for whatever is your default shell on the remote)
You can fix an existing session by running A better fix than hardcoding a value like that in your bashrc would require support from zellij. If zellij supported capturing the client environment variables at attach time and a mechanism to update the zellij environment on attach based on those values, you could keep zellij sessions up to date with env vars that change like that one (or even if you made .bashrc changes and you want to propagate that to a live session). The tmux way of doing this would be:
in your |
Hey @ga289395 - thank you very much for the detailed investigation and for helping us find the root cause of this issue! I think having these abilities in Zellij would make things much easier. So I'm going to re-open this issue and put a
|
Thank you for taking the time to file this issue! Please follow the instructions and fill in the missing parts below the instructions, if it is meaningful. Try to be brief and concise.
Basic information
zellij --version
: zellij 0.20.0tput lines
: 58tput cols
: 123uname -av
orver
(Windows): Linux pickle 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxList of programs you interact with as,
PROGRAM --version
: output cropped meaningful, for example:cargo 1.56.0 (4ed5d137b 2021-10-04)
rustc 1.56.0 (09c42c458 2021-10-18)
git version 2.33.0
zsh 5.8 (x86_64-ubuntu-linux-gnu)
Further information
I tried to use
zellijj
on a remote server which is used with ssh agent forwarding.ssh-add
zellij -s session_name options --disable-mouse-mode
Then go to my git repo and start working.
And after a random period of time the agent just stops to pass a key or something else happening, because I cannot reach a remote upstream in any way.
Once I end
zellij
session, go to the repo and do something with remote(it works) and open new session it works again for some time.The text was updated successfully, but these errors were encountered: