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

FIX/ENH: fix ioc-deploy auth, provide ssh-agent-helper #190

Merged
merged 14 commits into from
Jul 24, 2024

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented Jul 23, 2024

Description

Motivation and Context

  • ioc-deploy currently only works on public repos because it receives 404s from http checks of internal and private repos for logged out users. If we instead use the user's shell's existing ssh authentication, we don't need to pass passwords around, distribute PATs, etc.
  • I'd like to provide some ssh-agent helpers so that people only have to type in their ssh key one time. It's surprisingly nuanced to set these up, it's best practice to put time limits on your ssh-adds and make sure to clean up the agent on shell exit. The result is pretty concise but those are hard-fought lines of bash script...

How Has This Been Tested?

Interactively only

Where Has This Been Documented?

Only here, so far

@ZLLentz
Copy link
Member Author

ZLLentz commented Jul 23, 2024

I chatted with Robert and our consensus is that this probably shouldn't set up SSH agents, but it should let you know that your agent isn't set up and suggest actions to fix this. There should also be some helpers for creating SSH keys.

@ZLLentz ZLLentz changed the title WIP: fix ioc-deploy auth FIX/ENH: fix ioc-deploy auth, provide ssh-agent-helper Jul 24, 2024
@ZLLentz ZLLentz marked this pull request as ready for review July 24, 2024 01:16
slactjohnson
slactjohnson previously approved these changes Jul 24, 2024
Copy link
Contributor

@slactjohnson slactjohnson left a comment

Choose a reason for hiding this comment

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

No comments, LGTM

scripts/ioc_deploy.py Outdated Show resolved Hide resolved
scripts/ssh-agent-helper Show resolved Hide resolved
@ZLLentz
Copy link
Member Author

ZLLentz commented Jul 24, 2024

I fixed the stdout/stdin typo and greatly expanded the comments in ssh-agent-helper so it can be useful as a primer on how the agent setup works.

@ZLLentz
Copy link
Member Author

ZLLentz commented Jul 24, 2024

One more to-do: I need to add ssh-agent-helper to the README

@ZLLentz ZLLentz requested a review from tangkong July 24, 2024 19:01
Copy link
Contributor

@tangkong tangkong left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for explaining the bash shenanigans to me

@ZLLentz ZLLentz merged commit 3f5e951 into pcdshub:master Jul 24, 2024
2 checks passed
@ZLLentz ZLLentz deleted the fix_ioc_deploy_auth branch July 24, 2024 20:32
@janeliu-slac
Copy link

Sorry, I didn't have much to contribute. Read through the file changes and brushing up on bash scripting.

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.

4 participants