Merge pull request #33423 from AmineChikhaoui/gce-ssh-keys

Fix ssh keys retrieval in GCE instances

authored by Rob Vermaas and committed by GitHub 38538f32 aee7a0e9

+1 -1
+1 -1
nixos/modules/virtualisation/google-compute-image.nix
··· 212 212 echo "Obtaining SSH keys..." 213 213 mkdir -m 0700 -p /root/.ssh 214 214 AUTH_KEYS=$(${mktemp}) 215 - ${wget} -O $AUTH_KEYS http://metadata.google.internal/computeMetadata/v1/project/attributes/sshKeys 215 + ${wget} -O $AUTH_KEYS --header="Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/sshKeys 216 216 if [ -s $AUTH_KEYS ]; then 217 217 218 218 # Read in key one by one, split in case Google decided