|
|
@ -5,6 +5,7 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/moby/buildkit/session"
|
|
|
|
"github.com/moby/buildkit/session"
|
|
|
|
"github.com/moby/buildkit/session/sshforward/sshprovider"
|
|
|
|
"github.com/moby/buildkit/session/sshforward/sshprovider"
|
|
|
|
|
|
|
|
"github.com/moby/buildkit/util/gitutil"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func ParseSSHSpecs(sl []string) (session.Attachable, error) {
|
|
|
|
func ParseSSHSpecs(sl []string) (session.Attachable, error) {
|
|
|
@ -29,3 +30,9 @@ func parseSSH(value string) (*sshprovider.AgentConfig, error) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return &cfg, nil
|
|
|
|
return &cfg, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// IsGitSSH returns true if the given repo URL is accessed over ssh
|
|
|
|
|
|
|
|
func IsGitSSH(url string) bool {
|
|
|
|
|
|
|
|
_, gitProtocol := gitutil.ParseProtocol(url)
|
|
|
|
|
|
|
|
return gitProtocol == gitutil.SSHProtocol
|
|
|
|
|
|
|
|
}
|
|
|
|