libgit2: restrict smart creds to Type SSH Memory

Avoid asking for SSH credential in files, as they won't be
used. The cacheKeyAndConfig func already enforces this
behaviour.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
This commit is contained in:
Paulo Gomes 2022-04-07 05:49:00 +01:00
parent d86f0a280a
commit add07745f3
No known key found for this signature in database
GPG Key ID: 9995233870E99BEE
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ func (t *sshSmartSubtransport) Action(urlString string, action git2go.SmartServi
return nil, fmt.Errorf("unexpected action: %v", action)
}
cred, err := t.transport.SmartCredentials("", git2go.CredentialTypeSSHKey|git2go.CredentialTypeSSHMemory)
cred, err := t.transport.SmartCredentials("", git2go.CredentialTypeSSHMemory)
if err != nil {
return nil, err
}