From 5dba59d494b12c9f759fb7b01859d45e597a049b Mon Sep 17 00:00:00 2001 From: AmineChikhaoui Date: Thu, 4 Jan 2018 16:50:05 +0100 Subject: [PATCH] Fixes https://github.com/NixOS/nixops/issues/756. Seems the google compute metadata service behavior changed a bit recently which caused this issue ? see: https://cloud.google.com/compute/docs/storing-retrieving-metadata --- nixos/modules/virtualisation/google-compute-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix index e3b3e6a5f4ab..4e137e6c3121 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -211,7 +211,7 @@ in echo "Obtaining SSH keys..." mkdir -m 0700 -p /root/.ssh AUTH_KEYS=$(${mktemp}) - ${wget} -O $AUTH_KEYS http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys + ${wget} -O $AUTH_KEYS --header="Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys if [ -s $AUTH_KEYS ]; then # Read in key one by one, split in case Google decided