Commit 790be38
committed
Improve error message for encrypted SSH keys without password
Detect encrypted SSH identity keys early in getAuthOpts() by parsing
with ssh.ParseRawPrivateKey and checking for PassphraseMissingError.
When detected, return a clear error pointing the user to add the
'password' field to their Secret instead of the misleading
"SSH agent requested but SSH_AUTH_SOCK not-specified" message.
Fixes #802
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>1 parent a72cc39 commit 790be38
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
651 | 652 | | |
652 | 653 | | |
653 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
654 | 670 | | |
655 | 671 | | |
656 | 672 | | |
| |||
0 commit comments