Google cloud platform (gcloud.compute.scp)无法获取资源
我第一次使用GoogleCloud,我正在尝试将一个测试文件上传到我实例的根文件夹中。但是,我遇到了以下错误:Google cloud platform (gcloud.compute.scp)无法获取资源,google-cloud-platform,gcloud,Google Cloud Platform,Gcloud,我第一次使用GoogleCloud,我正在尝试将一个测试文件上传到我实例的根文件夹中。但是,我遇到了以下错误: ERROR: (gcloud.compute.scp) Could not fetch resource: - Invalid value '[ua2r-website]'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?' 我在该文件的路径中。这是我的命令
ERROR: (gcloud.compute.scp) Could not fetch resource:
- Invalid value '[ua2r-website]'. Values must match the following regular expression: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?'
我在该文件的路径中。这是我的命令:
gcloud compute scp [testtext.txt] [ua2r-website]:~/
我仔细检查了VM实例的拼写和标点符号,没有发现任何差异。删除['s和]'s
gcloud compute scp testtext.txt ua2r网站:~/您需要使用gcloud auth登录 gcloud auth login-授权gcloud使用Google用户凭据访问云平台 编写命令
gcloud auth login
然后,您将从GCP获得一个单击链接。您将从链接中获得一个代码,并将其复制回VM。然后你将被授权做这个手术。
这里有更多的细节
您还可以将文件从本地计算机文件系统拖放到项目所在位置的打开的unix shell中。尝试删除方括号。@DanCornilescu谢谢!!!很明显,当你真的在做这件事的时候,你会忽略正方形,这是常识!