[SOLVED] Cloud VM Access Problem: WARNING: You do not appear to have access to project [hf-flax] or it does not exist

I am trying to log into the cloud VM assigned to me.

But I am facing the problem:

$ gcloud config set project hf-flax
Updated property [core/project].
WARNING: You do not appear to have access to project [hf-flax] or it does not exist.

Before trying to do this, I have followed the steps to install Google Cloud SDK from here.

I did not start GCoud to get started by gcloud init. Because it tells me to enter a project name. Should I do this?

After following steps 1 through 4 there, I turn back to Hugging Face’s guide.

I have set the account, and I have logged in through the browser. Now, I cannot set the project and face the error message that I have mentioned.


Now, when I go ahead anyway with the steps, and run

$ gcloud alpha compute tpus tpu-vm ssh <name> --zone us-central1-a --project hf-flax
# I do replace the <name> placeholder with the name supplied to me

I see this message-

WARNING: The private SSH key file for gcloud does not exist.
WARNING: The public SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):

As suggested here, I clicked on the “Open Cloud Console” button, and I see this, as expected:

You don’t have sufficient permission to view this page


But, before all this, what I didn’t see (and still don’t see) is a pop-up as mentioned there-

“You should click on “Open Cloud Console” on the first mail and agree to the pop up windows that follows

There was no pop-up window after I see the permission error. I have tried after disabling Privacy extensions on Chrome as they sometimes block pop-ups. But no luck.

This is what I see-

This is the same before and after I run the setup steps.


What should I do?

I went ahead with this prompt-

Let’s say I typed in “foobarbaz”.

It is successful, and it shows-

Your identification has been saved in /home/<user>/.ssh/google_compute_engine
Your public key has been saved in /home/<user>/.ssh/google_compute_engine.pub
The key fingerprint is:
SHA256: <sha256 code> <user>@<computer-name>
The key’s randomart image is:
±–[RSA 3072]----+
| |
| |
| |
| |
| |
| |
| |
| |
| |
±—[SHA256]-----+

(I removed the characters)

This time, and whenever I run

$ gcloud alpha compute tpus tpu-vm ssh <name> --zone us-central1-a --project hf-flax

I get-

SSH: Attempting to connect to worker 0…
sign_and_send_pubkey: signing failed for RSA “/home/<user>/.ssh/google_compute_engine” from agent: agent refused operation
<user>@x.x.x.x: Permission denied (publickey).
Retrying: SSH command error: [/usr/bin/ssh] exited with return code [255].
SSH: Attempting to connect to worker 0…
sign_and_send_pubkey: signing failed for RSA “/home/<user>/.ssh/google_compute_engine” from agent: agent refused operation
<user>@x.x.x.x: Permission denied (publickey).
Retrying: SSH command error: [/usr/bin/ssh] exited with return code [255].
^C

Command killed by keyboard interrupt

Then I get asked to enter my password repeatedly. I type in the password, it gets accepted, then another prompt appears.

It says- “Enter password to unlock the private key, an application wants to access the private key “<user>@<computer>”, but it is locked.”


$ cat /etc/apt/sources.list.d/google-cloud-sdk.list

returns-

deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main

Turns out I was using my local password than the passphrase that I set.

The password I needed to enter was “foobarbaz” and not the local password.

The prompts were identical, and I entered the local computer password.