Merge pull request #2584 from dgageot/2561-pubkey-username

FIX #2561 SSH pubkey should have username comment
This commit is contained in:
Jean-Laurent de Morlhon 2015-12-15 11:54:42 +01:00
commit b85efca4f0
1 changed files with 1 additions and 1 deletions

View File

@ -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{