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

Generate ssh key #774

Merged
merged 11 commits into from
Mar 24, 2020
Merged

Generate ssh key #774

merged 11 commits into from
Mar 24, 2020

Conversation

rberrelleza
Copy link
Member

@rberrelleza rberrelleza commented Mar 21, 2020

This is part of #475

Proposed changes

  • Generate an SSH key pair
  • Add it to the SSH configuration

By itself, this doesn't do anything until remote accepts public key authentication

I decided to create a separate key to keep it separately from existing setup. This is something we could even use later for access to other services (like buildkit). Another option is to use the users's private/public keys for this. what do you think?

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
@codecov
Copy link

codecov bot commented Mar 21, 2020

Codecov Report

Merging #774 into master will increase coverage by 0.50%.
The diff coverage is 56.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #774      +/-   ##
==========================================
+ Coverage   31.93%   32.44%   +0.50%     
==========================================
  Files          62       63       +1     
  Lines        4831     4931     +100     
==========================================
+ Hits         1543     1600      +57     
- Misses       3167     3199      +32     
- Partials      121      132      +11     
Impacted Files Coverage Δ
cmd/dependencies.go 0.00% <0.00%> (ø)
cmd/up.go 0.00% <0.00%> (ø)
cmd/version.go 27.65% <0.00%> (-0.61%) ⬇️
pkg/ssh/config.go 74.24% <ø> (ø)
pkg/ssh/exec.go 0.00% <0.00%> (ø)
pkg/ssh/manager.go 68.88% <33.33%> (-3.21%) ⬇️
pkg/ssh/key.go 65.51% <65.51%> (ø)
pkg/ssh/client.go 71.42% <70.00%> (-28.58%) ⬇️
pkg/model/dev.go 65.14% <72.72%> (+0.47%) ⬆️
pkg/ssh/ssh.go 75.00% <100.00%> (+0.80%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e3ba4e...28dc667. Read the comment docs.

Copy link
Contributor

@pchico83 pchico83 left a comment

Choose a reason for hiding this comment

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

I would go with this approach too.
I wouldn't show any output related to SSH, I think it is an implementation detail, but we can do that later when we consolidate the ssh implementation.

@rberrelleza
Copy link
Member Author

I wouldn't show any output related to SSH, I think it is an implementation detail, but we can do that later when we consolidate the ssh implementation.

That's somethign that I've been thinking about as well. We need to show output because generating those keys takes about 10 seconds. Maybe change the text to just talk about generating key pair?

@pchico83
Copy link
Contributor

@rberrelleza yes, for now I would go with this implementation. in the future, we can abstract SSH away and don't show anything ssh related in the output

rberrelleza and others added 4 commits March 23, 2020 17:16
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
@derek derek bot added the no-dco label Mar 24, 2020
@derek
Copy link

derek bot commented Mar 24, 2020

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide.
Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
@rberrelleza
Copy link
Member Author

@pchico83 @rlamana what do you think of the message?
image

@pchico83
Copy link
Contributor

@pchico83 @rlamana what do you think of the message?
image

Love it!

@rberrelleza rberrelleza merged commit 8f5d6b7 into master Mar 24, 2020
@rberrelleza rberrelleza deleted the generate-ssh-key branch March 24, 2020 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants