From b995a4d65a3e666b6cdec79036db0379b3d58b69 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Tue, 15 Dec 2015 11:12:53 +0100 Subject: [PATCH] FIX #2561 SSH pubkey should have username comment Signed-off-by: David Gageot --- drivers/google/compute_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/google/compute_util.go b/drivers/google/compute_util.go index 72e3f4e2ff..846b9deae4 100644 --- a/drivers/google/compute_util.go +++ b/drivers/google/compute_util.go @@ -297,7 +297,7 @@ func (c *ComputeUtil) createInstance(d *Driver) error { } log.Infof("Uploading SSH Key") - metaDataValue := c.userName + ":" + string(sshKey) + "\n" + metaDataValue := fmt.Sprintf("%s:%s %s\n", c.userName, strings.TrimSpace(string(sshKey)), c.userName) op, err = c.service.Instances.SetMetadata(c.project, c.zone, c.instanceName, &raw.Metadata{ Fingerprint: instance.Metadata.Fingerprint, Items: []*raw.MetadataItems{