ERROR: (gcloud.compute.ssh) Could not fetch resource: - Insufficient Permission

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 12:45:44

问题


I am having trouble working through the Compute Engine Quickstart: Build a to-do app with a MongoDB tutorial. (edit: I am running the tutorial from within the compute engine console; i.e. https://console.cloud.google.com/compute/instances?project=&tutorial=compute_quickstart)

I SSH into the backend instance. I enter the "gcloud compute" command as copied from the tutorial. I am prompted to enter a passphrase. The following is returned:

WARNING: The public SSH key file for gcloud does not exist.

WARNING: The private 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.

Enter passphrase (empty for no passphrase): 

Enter same passphrase again: 

Your identification has been saved in

...

<< Identifying detail ommitted >>

...

**ERROR: (gcloud.compute.ssh) Could not fetch resource:
 - Insufficient Permission**

I had run through this stage of the tutorial on a previous occasion with no problems. I am working from a Windows 10 PC with the google-cloud-sdk installed. I am using google chrome. I have tried in both regular and incognito modes.

Any help or advice greatfully received!

  • DaveDub

回答1:


It looks like the attempt to SSH is recognising the instance in your project, but the user doesn't have the required permissions to access the machine.

Have you tried running:

gcloud auth login

and completing the web-based authorization to ensure you are attempting to access the machine as the correct (authenticated) user? This process ensures the Cloud SDK you are running inherits the permissions of the user specified in the web-based authorisation. See here for more information on this.

It's also worth adding the link to the tutorial you are following to your question.



来源:https://stackoverflow.com/questions/49584800/error-gcloud-compute-ssh-could-not-fetch-resource-insufficient-permission

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!