Add support for ssh passphrases.

This commit is contained in:
Marcin Bilski
2022-01-14 12:35:20 +01:00
parent 6768e02d91
commit c327898faa
4 changed files with 13 additions and 11 deletions

View File

@@ -324,7 +324,7 @@ func (g *gitVCS) commit(ctx context.Context, version Version) (*object.Commit, e
func (g *gitVCS) authMethod() (transport.AuthMethod, error) {
if g.auth.Key != "" {
return ssh.NewPublicKeysFromFile("git", g.auth.Key, "")
return ssh.NewPublicKeysFromFile("git", g.auth.Key, g.auth.Password)
} else if g.auth.Username != "" {
return &http.BasicAuth{Username: g.auth.Username, Password: g.auth.Password}, nil
}