Skip to content

Commit e3e60da

Browse files
Update src/proxy/ssh/AgentForwarding.ts
Co-authored-by: Juan Escalada <97265671+jescalada@users.noreply.github.com> Signed-off-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
1 parent 0ff683e commit e3e60da

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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)