当我尝试使用Golang“ libretto”库从脚本实例VM时遇到此问题
vm := &gcp.VM{
Name: "test-vm-2",
Zone: "us-central1-f",
MachineType: "n1-standard-1",
SourceImage: "centos-7-v20181011",
Disks: []gcp.Disk{
{
DiskType: "pd-standard",
DiskSizeGb: 10,
AutoDelete: true,
},
},
Preemptible: false,
Network: "default",
Subnetwork: "default",
UseInternalIP: false,
Project: os.Getenv(accountFile.ProjectID),
Scopes: []string {
"https://www.googleapis.com/auth/devstorage.read_write",
"https://www.googleapis.com/auth/logging.write",
},
AccountFile: "key.json",
SSHCreds: ssh.Credentials {
SSHUser: "VinCur",
SSHPrivateKey: accountFile.PrivateKey,
},
SSHPublicKey: pub_ssh,
}
这是代码...一些解决方案?