Skip to content

Commit e3e60da

Browse files
Update src/proxy/ssh/AgentForwarding.ts
Co-authored-by: Juan Escalada <[email protected]> Signed-off-by: Fabio Vincenzi <[email protected]>
1 parent 0ff683e commit e3e60da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/proxy/ssh/AgentForwarding.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ export class LazySSHAgent extends BaseAgent {
8585
const keys = identities.map((identity) => identity.publicKeyBlob);
8686

8787
console.log(`[LazyAgent] Returning ${keys.length} identities`);
88+
89+
if (keys.length === 0) {
90+
throw new Error('No identities found. Run ssh-add <key> on this terminal to add your SSH key.');
91+
}
8892

8993
// Close the temporary agent channel
9094
if (agentProxy) {

0 commit comments

Comments
 (0)