【问题标题】:How to copy files from a SSH into a Google Cloud Repo如何将文件从 SSH 复制到 Google Cloud Repo
【发布时间】:2021-04-27 05:53:55
【问题描述】:

我无法在 SSH 中使用“gcloud app deploy”,所以现在我需要获取这些文件并将它们带入我的 Google 存储库(我的项目)然后部署,以便我使用这些文件(包括用于网站的 html)。以下是文件在 SSH 中的样子:


jinthemix@cloudshell:~ (website-deploying-gc)$ ssh jinthemix@vergil.u.washington.edu
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$

这就是谷歌云的样子(除了已经存在的文件之外,没有其他文件):


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

任何关于如何将文件复制到本地谷歌云项目的想法都会有所帮助,谢谢

【问题讨论】:

  • 您想将文件从该服务器vergil.u.washington.edu 复制到 CloudShell?
  • 是的,我想将文件从服务器(ssh)复制到 CloudShell
  • 具体在项目中标明到代码中(website-deploying-gc)(也是下一次我只是将Bitbucket中的文件复制到项目中)

标签: google-cloud-platform ssh deployment bitbucket gcloud


【解决方案1】:

使用 CloudShell 中的 scp command

jinthemix@cloudshell:~ scp -r jinthemix@vergil.u.washington.edu:~/Files/websitegc/* .

此命令使用 OpenSSH 在网络上的主机之间复制文件,并且在 -r 标志的帮助下,它将递归地对指定主机中的所有文件和文件夹执行此操作。

【讨论】:

  • 所以这会将所有文件专门从 Files 文件夹复制到项目中(website-deploying-gc)?
  • 我现在对这个问题很好,感谢您的帮助,不胜感激
猜你喜欢
  • 2018-06-15
  • 2019-11-06
  • 2017-11-29
  • 2019-01-01
  • 2020-09-11
  • 2015-06-27
  • 2017-07-06
  • 1970-01-01
  • 2020-04-20
相关资源
最近更新 更多