Skip to content

Commit b995a4d

Browse files
committed
FIX docker-archive-public#2561 SSH pubkey should have username comment
Signed-off-by: David Gageot <david@gageot.net>
1 parent c14770f commit b995a4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/google/compute_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func (c *ComputeUtil) createInstance(d *Driver) error {
297297
}
298298

299299
log.Infof("Uploading SSH Key")
300-
metaDataValue := c.userName + ":" + string(sshKey) + "\n"
300+
metaDataValue := fmt.Sprintf("%s:%s %s\n", c.userName, strings.TrimSpace(string(sshKey)), c.userName)
301301
op, err = c.service.Instances.SetMetadata(c.project, c.zone, c.instanceName, &raw.Metadata{
302302
Fingerprint: instance.Metadata.Fingerprint,
303303
Items: []*raw.MetadataItems{

0 commit comments

Comments
 (0)