File tree Expand file tree Collapse file tree
packages/google-cloud-storage/cloudbuild Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,10 +13,15 @@ steps:
1313 - " -c"
1414 - |
1515 #!/bin/bash
16- echo "Resetting full OS Login profile to clear 32KiB limit..."
17- # This deletes the entire profile (keys + posix accounts) for the current user
18- gcloud compute os-login describe --quiet > /dev/null 2>&1 && \
19- gcloud compute os-login delete-profile --quiet || echo "No profile to delete."
16+ echo "Fetching and removing all OS Login SSH keys to clear 32KiB limit..."
17+ # Get fingerprints and remove them one by one
18+ FINGERPRINTS=$$(gcloud compute os-login ssh-keys list --format="value(fingerprint)")
19+ for FINGERPRINT in $$FINGERPRINTS; do
20+ echo "Removing key: $$FINGERPRINT"
21+ gcloud compute os-login ssh-keys remove --key="$$FINGERPRINT" --quiet || true
22+ done
23+ # Also attempt a profile delete as a fallback
24+ gcloud compute os-login delete-profile --quiet || true
2025 waitFor : ["-"]
2126
2227 # Step 0: Generate a persistent SSH key for this build run.
You can’t perform that action at this time.
0 commit comments