mirror of https://github.com/portainer/portainer
feat(1752): run gofmt
parent
ef800d5a7d
commit
a36c45822a
|
@ -46,6 +46,8 @@ func cloneRepository(repositoryURL, referenceName string, destination string) er
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ClonePrivateRepositoryWithDeploymentKey clones a private git repository using the specified URL in the specified
|
||||||
|
// destination folder. It will use the specified deployment key for SSH based authentication
|
||||||
func (service *Service) ClonePrivateRepositoryWithDeploymentKey(repositoryURL, referenceName string, destination string, privateKeyPem []byte) error {
|
func (service *Service) ClonePrivateRepositoryWithDeploymentKey(repositoryURL, referenceName string, destination string, privateKeyPem []byte) error {
|
||||||
signer, _ := ssh.ParsePrivateKey(privateKeyPem)
|
signer, _ := ssh.ParsePrivateKey(privateKeyPem)
|
||||||
auth := &gitSsh.PublicKeys{
|
auth := &gitSsh.PublicKeys{
|
||||||
|
|
|
@ -222,7 +222,7 @@ type (
|
||||||
// DeploymentKey represents the SSH key details that will be used to
|
// DeploymentKey represents the SSH key details that will be used to
|
||||||
// connect to GitHub for deployments based on private key clone
|
// connect to GitHub for deployments based on private key clone
|
||||||
DeploymentKey struct {
|
DeploymentKey struct {
|
||||||
ID DeploymentKeyID `json:"Id`
|
ID DeploymentKeyID `json:"Id"`
|
||||||
Name string `json:"Name"`
|
Name string `json:"Name"`
|
||||||
PublicKey string `json:"PublicKey"`
|
PublicKey string `json:"PublicKey"`
|
||||||
PrivateKey []byte `json:"PrivateKey"`
|
PrivateKey []byte `json:"PrivateKey"`
|
||||||
|
|
Loading…
Reference in New Issue