`gcloud compute copy-files`: permission denied when copying files

前端 未结 7 1965
滥情空心
滥情空心 2020-12-04 22:24

I\'m having a hard time copying files over to my Google Compute Engine. I am using an Ubuntu server on Google Compute Engine.

I\'m doing this from my OS X terminal a

7条回答
  •  被撕碎了的回忆
    2020-12-04 22:38

    This is to copy files from remote machine to your machine. And make sure you have ssh setup because this will use default ssh keys. This worked for me:

    gcloud compute scp 'username'@'instance_name':~/source_dir  /destination_dir --recurse
    

    This is the generic syntax, so if you want to copy files from your machine to remote machine, you can use this. --recurse : required to copy directories with other files inside

    Syntax: gcloud compute scp 'SOURCE' 'DESTINATION'

    NOTE: run it without root

提交回复
热议问题