Skip to content
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

Run and add ssh key to agent #6

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Oct 13, 2023

fixes #4

@unkcpz
Copy link
Member Author

unkcpz commented Oct 13, 2023

If you test with latest full-stack docker image, after generating the key pairs and the ssh-add runs to add to agent. You may still not able to see the key added with ssh-add -l when you open a new terminal app. The reason is there are two ssh-agent running. This is another thing we need to address by aiidalab/aiidalab-docker-stack#409. Only one ssh-agent will run on the session and as mentioned by @danielhollas, it may not be a good idea to put script in .bashrc.
But for this PR, I think it is ready, if you make sure there is only one ssh-agent, after generating the keys, you can find it also added to the agent.

@danielhollas
Copy link

The reason is there are two ssh-agent running.

I don't understand. How is it possible that two ssh-agents are running? I thought that the script that we use should ensure that only one ssh-agent is running.

@unkcpz
Copy link
Member Author

unkcpz commented Oct 13, 2023

I don't understand. How is it possible that two ssh-agents are running?

I have no idea, to be honest. The good thing is I can reproduce it with full-stack. Let's try to merge aiidalab/aiidalab-docker-stack#409 first and see if the problem disappears. At least, I think your change there makes things more clear. Hope we can find the problem if it is still exist.

@unkcpz
Copy link
Member Author

unkcpz commented Oct 23, 2023

This is tested with the newly released docker stack (I use ghcr.io/aiidalab/qe:edge) and the key is successfully added to ssh-agent.
@yakutovicha Can you have a look and test it? After this change, the computational resource widget can work with this mfa-cscs seamlessly.

@yakutovicha
Copy link
Member

This is tested with the newly released docker stack (I use ghcr.io/aiidalab/qe:edge) and the key is successfully added to ssh-agent. @yakutovicha Can you have a look and test it? After this change, the computational resource widget can work with this mfa-cscs seamlessly.

Sorry, @unkcpz, I am on it now.

Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested things locally, it is all good 👍

@unkcpz
Copy link
Member Author

unkcpz commented Nov 2, 2023

Cool, thanks! Then I'll prepare a release and put the app on the app store, is that okay for you?

@unkcpz unkcpz merged commit 2e57495 into main Nov 2, 2023
1 of 5 checks passed
@unkcpz unkcpz deleted the feat/xx/ssh-add-after-renew-keys branch November 2, 2023 10:08
@yakutovicha
Copy link
Member

Cool, thanks! Then I'll prepare a release and put the app on the app store, is that okay for you?

Yep, please go ahead, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the new key to the ssh-agent
3 participants