8000 plumbing: transport/ssh, support more formats in `NewPublicKeys` SSH helper by hiddeco · Pull Request #298 · go-git/go-git · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

plumbing: transport/ssh, support more formats in NewPublicKeys SSH helper #298

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

Merged
merged 2 commits into from
Apr 16, 2021

Conversation

hiddeco
Copy link
Member
@hiddeco hiddeco commented Apr 14, 2021

Fixes #297

@mcuadros
Copy link
Member

can you rabase?

Signed-off-by: Hidde Beydals <hello@hidde.co>
@hiddeco hiddeco force-pushed the ssh-transport-key-formats branch from 66723ca to 04d17c1 Compare April 16, 2021 10:06
By switching to `ParsePrivateKey` and `ParsePrivateKeyWithPassphrase`
from `crypto/ssh`, which has support for RSA (PKCS#1), PKCS#8, DSA
(OpenSSL), and ECDSA private keys.

Signed-off-by: Hidde Beydals <hello@hidde.co>
@hiddeco hiddeco force-pushed the ssh-transport-key-formats branch from 04d17c1 to 022cc6c Compare April 16, 2021 10:08
@hiddeco
Copy link
Member Author
hiddeco commented Apr 16, 2021

Done.

@mcuadros mcuadros changed the title Support more formats in NewPublicKeys SSH helper plumbing: transport/ssh, support more formats in NewPublicKeys SSH helper Apr 16, 2021
@mcuadros mcuadros merged commit 77e7ef9 into go-git:master Apr 16, 2021
@hiddeco hiddeco deleted the ssh-transport-key-formats branch April 20, 2021 09:28
hiddeco added a commit to fluxcd/flux2 that referenced this pull request May 10, 2021
This changes the logic for the parsing of private keys, as already
done for the source-controller, so that it is able to recognize and
work with a wider range of key formats instead of returning a vague
error:

```console
$ flux bootstrap git [..]
✗ ssh: this private key is passphrase protected
```

A patch for this was already submitted and merged in `go-git/go-git`,
but is not made available in a release yet:
go-git/go-git#298

Signed-off-by: Hidde Beydals <hello@hidde.co>
hiddeco added a commit to fluxcd/flux2 that referenced this pull request May 10, 2021
This changes the logic for the parsing of private keys, as already
done for the source-controller, so that it is able to recognize and
work with a wider range of key formats instead of returning a vague
error:

```console
$ flux bootstrap git [..]
✗ ssh: this private key is passphrase protected
```

A patch for this was already submitted and merged in `go-git/go-git`,
but is not made available in a release yet:
go-git/go-git#298

Signed-off-by: Hidde Beydals <hello@hidde.co>
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.

SSH transport does not support newer encryption formats
2 participants
0