我很难将文件复制到我的Google Compute Engine中。我在Google Compute Engine上使用Ubuntu服务器。
我正在OS X终端上执行此操作,并且已经获得使用的授权gcloud。
gcloud
local:$ gcloud compute copy-files /Users/Bryan/Documents/Websites/gce/index.php example-instance:/var/www/html --zone us-central1-a Warning: Permanently added '<IP>' (RSA) to the list of known hosts. scp: /var/www/html/index.php: Permission denied ERROR: (gcloud.compute.copy-files) [/usr/bin/scp] exited with return code [1].
root@在实例名称之前插入:
root@
local:$ gcloud compute copy-files /Users/Bryan/Documents/Websites/gce/index.php root@example-instance:/var/www/html --zone us-central1-a