deis / workflow-cli

The CLI for Deis Workflow
http://deis.com
MIT License
31 stars 43 forks source link

fix(ssh): support ed25519 SSH keys #260

Closed seanknox closed 7 years ago

seanknox commented 7 years ago

Updated the SSH parser regex to allow for ed25519 SSH keys. Also added (very simple) test for key that would fail the regex.

I develop in other languages but this is the very first golang code I've ever written, so very open to any nits you may have.

deis-bot commented 7 years ago

@arschles is a potential reviewer of this pull request based on my analysis of git blame information. Thanks @seanknox!

Joshua-Anderson commented 7 years ago

Do the controller and builder support ed25519 keys?

seanknox commented 7 years ago

@Joshua-Anderson AFAICT they do; I added additional controller testing in https://github.com/deis/controller/pull/1109 to help answer that question in the future. builder uses crypto/ssh which supports Ed25519.

Joshua-Anderson commented 7 years ago

Cool! It looks like this has some minor linter problems:

Manadatory Linters: These must pass
pkg/ssh/ssh_test.go:1::warning: file is not gofmted with -s (gofmt)
Optional Linters: These should pass
pkg/ssh/ssh_test.go:24:9:warning: range var keyAndId should be keyAndID (golint)
pkg/ssh/ssh_test.go:43:9:warning: range var keyAndId should be keyAndID (golint)

You can run make test-style to run them locally

seanknox commented 7 years ago

Fixed—thanks for the heads up.

codecov-io commented 7 years ago

Current coverage is 72.35% (diff: 100%)

Merging #260 into master will increase coverage by 0.05%

@@             master       #260   diff @@
==========================================
  Files            57         57          
  Lines          3925       3925          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2838       2840     +2   
+ Misses          777        776     -1   
+ Partials        310        309     -1   

Powered by Codecov. Last update b5378f7...9c73132