Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
304 views
in Technique[技术] by (71.8m points)

How to copy files from a SSH into a Google Cloud Repo

I could not use the "gcloud app deploy" inside of a SSH, so now I need to grab those files and bring them into my Google repo (my project) then deploy so I create the website with the files (that include the html used for the website). Here is what the files look like inside the SSH:


jinthemix@cloudshell:~ (website-deploying-gc)$ ssh [email protected]
Password: _
Last login: Wed Jan 20 20:20:45 2021 from 157.119.197.35.bc.googleusercontent.com


vergil11$ ls
GITREPOS  IMD233  Mix 1  Mix 2  Mix 3  Mix 4  Files  public_html  README.md  websitedeployinggc
vergil11$ cd Files
vergil11$ cd websitegc
vergil11$ ls
app.yaml  IMD233  Files  README.md  www
vergil11$

And here is what the google cloud looks like (there is no files besides the one already in here):


jinthemix@cloudshell:~ (website-deploying-gc)$ ls
README-cloudshell.txt
jinthemix@cloudshell:~ (website-deploying-gc)$

Any ideas on how copy the files into the google cloud project locally would help, thanks

question from:https://stackoverflow.com/questions/65850672/how-to-copy-files-from-a-ssh-into-a-google-cloud-repo

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Use the scp command from CloudShell

jinthemix@cloudshell:~ scp -r [email protected]:~/Files/websitegc/* .

This command uses OpenSSH to copy files between hosts on a network and with the help of the -r flag it will do it recursively with all the files and folders within the specified hosts.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...