1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-01 00:54:58 +02:00

Add credential prompts for PKCS11-based SSH keys

This commit is contained in:
Jadeiin
2025-06-16 03:32:15 +08:00
committed by Stefan Haller
parent 80887f5791
commit b5c2524d75
2 changed files with 8 additions and 1 deletions

View File

@ -391,6 +391,7 @@ func (self *cmdObjRunner) getCheckForCredentialRequestFunc() func([]byte) (Crede
`Username\s*for\s*'.+':`: Username,
`Enter\s*passphrase\s*for\s*key\s*'.+':`: Passphrase,
`Enter\s*PIN\s*for\s*.+\s*key\s*.+:`: PIN,
`Enter\s*PIN\s*for\s*'.+':`: PIN,
`.*2FA Token.*`: Token,
}

View File

@ -89,11 +89,17 @@ func TestProcessOutput(t *testing.T) {
expectedToWrite: "passphrase",
},
{
name: "pin prompt",
name: "security key pin prompt",
promptUserForCredential: defaultPromptUserForCredential,
output: "Enter PIN for key '123':",
expectedToWrite: "pin",
},
{
name: "pkcs11 key pin prompt",
promptUserForCredential: defaultPromptUserForCredential,
output: "Enter PIN for '123':",
expectedToWrite: "pin",
},
{
name: "2FA token prompt",
promptUserForCredential: defaultPromptUserForCredential,