Google app engine 更改gcloud远程用户目录
如何更改gcloud将文件复制到的主目录。我正在使用下面的命令将一个文件从本地Windows帐户复制到位于Google计算引擎实例中的UbuntuGoogle app engine 更改gcloud远程用户目录,google-app-engine,gcloud,Google App Engine,Gcloud,如何更改gcloud将文件复制到的主目录。我正在使用下面的命令将一个文件从本地Windows帐户复制到位于Google计算引擎实例中的Ubuntu gcloud compute copy-files readme.md compute-engine-instance:readme.md 出于某些疯狂的原因,自述文件最终将位于远程主目录中,并与我的本地用户帐户同名。我想指定将该文件复制到计算引擎上的哪个主目录。gcloud compute copy files和其他与SSH相关的命令默认使用本地
gcloud compute copy-files readme.md compute-engine-instance:readme.md
出于某些疯狂的原因,自述文件最终将位于远程主目录中,并与我的本地用户帐户同名。我想指定将该文件复制到计算引擎上的哪个主目录。
gcloud compute copy files
和其他与SSH相关的命令默认使用本地用户的名称作为远程主机上的用户名(请注意,这与普通SSH的行为非常类似)
尝试
gcloud compute copy files readme.mdotheruser@compute-引擎实例:
。正如您在gcloud compute copy files--help中看到的,该命令具有以下规范:
gcloud compute copy-files [[USER@]INSTANCE:]SRC [[[USER@]INSTANCE:]SRC ...]
[[USER@]INSTANCE:]DEST [--dry-run] [--plain]
[--ssh-key-file SSH_KEY_FILE] [--zone ZONE] [GLOBAL-FLAG ...]
您可以指定用户或完整路径来执行所需操作
gcloud compute copy-files readme.md user@compute-engine-instance:readme.md
或
目标也可以是目录。所以这些也会起作用
gcloud compute copy-files readme.md user@compute-engine-instance:~
或
gcloud compute copy-files readme.md user@compute-engine-instance:~
gcloud compute copy-files readme.md compute-engine-instance:/home/user