Skip to content

Commit c7f1f75

Browse files
committed
improve(ssh): enhance agent forwarding error message
1 parent 649625e commit c7f1f75

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/proxy/ssh/sshHelpers.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ function calculateHostKeyFingerprint(keyBuffer: Buffer): string {
2020
*/
2121
const DEFAULT_AGENT_FORWARDING_ERROR =
2222
'SSH agent forwarding is required.\n\n' +
23-
'Configure it for this repository:\n' +
23+
'Why? The proxy uses your SSH keys (via agent forwarding) to authenticate\n' +
24+
'with GitHub/GitLab. Your keys never leave your machine - the proxy just\n' +
25+
'forwards authentication requests to your local SSH agent.\n\n' +
26+
'To enable agent forwarding for this repository:\n' +
2427
' git config core.sshCommand "ssh -A"\n\n' +
2528
'Or globally for all repositories:\n' +
2629
' git config --global core.sshCommand "ssh -A"\n\n' +
27-
'Note: Configuring per-repository is more secure than using --global.';
30+
'Also ensure SSH keys are loaded in your agent:\n' +
31+
' ssh-add -l # List loaded keys\n' +
32+
' ssh-add ~/.ssh/id_ed25519 # Add your key if needed\n\n' +
33+
'Note: Per-repository config is more secure than --global.';
2834

2935
/**
3036
* Validate prerequisites for SSH connection to remote

0 commit comments

Comments
 (0)