1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

Merge pull request #2239 from bdach/u2f-key-prompts

close https://github.com/jesseduffield/lazygit/issues/2230
This commit is contained in:
Jesse Duffield 2022-12-20 21:44:29 +11:00 committed by GitHub
commit 5679efe174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,7 @@ const (
Password CredentialType = iota Password CredentialType = iota
Username Username
Passphrase Passphrase
PIN
) )
type cmdObjRunner struct { type cmdObjRunner struct {
@ -335,6 +336,7 @@ func (self *cmdObjRunner) getCheckForCredentialRequestFunc() func([]byte) (Crede
`Password\s*for\s*'.+':`: Password, `Password\s*for\s*'.+':`: Password,
`Username\s*for\s*'.+':`: Username, `Username\s*for\s*'.+':`: Username,
`Enter\s*passphrase\s*for\s*key\s*'.+':`: Passphrase, `Enter\s*passphrase\s*for\s*key\s*'.+':`: Passphrase,
`Enter\s*PIN\s*for\s*.+\s*key\s*.+:`: PIN,
} }
for pattern, askFor := range prompts { for pattern, askFor := range prompts {

View File

@ -61,6 +61,8 @@ func (self *CredentialsHelper) getTitleAndMask(passOrUname oscommands.Credential
return self.c.Tr.CredentialsPassword, true return self.c.Tr.CredentialsPassword, true
case oscommands.Passphrase: case oscommands.Passphrase:
return self.c.Tr.CredentialsPassphrase, true return self.c.Tr.CredentialsPassphrase, true
case oscommands.PIN:
return self.c.Tr.CredentialsPIN, true
} }
// should never land here // should never land here

View File

@ -29,6 +29,7 @@ type TranslationSet struct {
CredentialsUsername string CredentialsUsername string
CredentialsPassword string CredentialsPassword string
CredentialsPassphrase string CredentialsPassphrase string
CredentialsPIN string
PassUnameWrong string PassUnameWrong string
CommitChanges string CommitChanges string
AmendLastCommit string AmendLastCommit string
@ -676,6 +677,7 @@ func EnglishTranslationSet() TranslationSet {
CredentialsUsername: "Username", CredentialsUsername: "Username",
CredentialsPassword: "Password", CredentialsPassword: "Password",
CredentialsPassphrase: "Enter passphrase for SSH key", CredentialsPassphrase: "Enter passphrase for SSH key",
CredentialsPIN: "Enter PIN for SSH key",
PassUnameWrong: "Password, passphrase and/or username wrong", PassUnameWrong: "Password, passphrase and/or username wrong",
CommitChanges: "commit changes", CommitChanges: "commit changes",
AmendLastCommit: "amend last commit", AmendLastCommit: "amend last commit",