mirror of
https://github.com/apricote/hcloud-upload-image.git
synced 2026-02-07 10:17:03 +00:00
refactor: drop custom package in favor of hcloud-go
This commit is contained in:
parent
a07856317d
commit
4a54ff8834
3 changed files with 2 additions and 80 deletions
|
|
@ -10,6 +10,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/hetznercloud/hcloud-go/v2/hcloud"
|
||||
"github.com/hetznercloud/hcloud-go/v2/hcloud/exp/kit/sshutils"
|
||||
"golang.org/x/crypto/ssh"
|
||||
|
||||
"github.com/apricote/hcloud-upload-image/hcloudimages/contextlogger"
|
||||
|
|
@ -17,7 +18,6 @@ import (
|
|||
"github.com/apricote/hcloud-upload-image/hcloudimages/internal/control"
|
||||
"github.com/apricote/hcloud-upload-image/hcloudimages/internal/labelutil"
|
||||
"github.com/apricote/hcloud-upload-image/hcloudimages/internal/randomid"
|
||||
"github.com/apricote/hcloud-upload-image/hcloudimages/internal/sshkey"
|
||||
"github.com/apricote/hcloud-upload-image/hcloudimages/internal/sshsession"
|
||||
)
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ func (s *Client) Upload(ctx context.Context, options UploadOptions) (*hcloud.Ima
|
|||
|
||||
// 1. Create SSH Key
|
||||
logger.InfoContext(ctx, "# Step 1: Generating SSH Key")
|
||||
publicKey, privateKey, err := sshkey.GenerateKeyPair()
|
||||
privateKey, publicKey, err := sshutils.GenerateKeyPair()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to generate temporary ssh key pair: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue