简体   繁体   English

如何从计算引擎访问谷歌驱动器

[英]How to access google drive from compute engine

I haven't used GCE before but was planning on using it for some CPU bound R scripts.我之前没有使用过 GCE,但计划将其用于某些 CPU 绑定 R 脚本。

I see that on the.network section of pricing it says there is free egress and ingress with google drive.我在定价的网络部分看到它说谷歌驱动器可以免费进出。 I don't see any documentation on how to access my google drive from within a GCE.我没有看到任何关于如何从 GCE 访问我的谷歌驱动器的文档。 Is there documentation on this that someone can point me towards?是否有关于此的文档可以指出我的方向?

I recommend using Google Cloud Storage instead of drive.我建议使用 Google Cloud Storage 而不是驱动器。 Drive is a more consumer oriented (and expensive) product. Drive 是一种更面向消费者(且价格昂贵)的产品。 Its extra features are geared towards file management and not moving around data blobs which is what you would need when programming.它的额外功能面向文件管理,而不是在编程时需要的数据 blob 中移动。

If you really want to use it you can drive, you can find the API documentation at https://developers.google.com/drive/如果你真的想使用它你可以开车,你可以在https://developers.google.com/drive/找到 API 文档

Drive is NOT part of the Google Cloud Platform and there are no special instructions or integrations other than the network pricing. Drive 不是 Google Cloud Platform 的一部分,除了网络定价之外没有特殊说明或集成。

据我所知,除了使用像gdrive这样的 3rd 方工具之外,没有开箱即用的方法可以从计算引擎中做到这一点,它可以在 Linux、Windows CE 中使用。

As far as I can tell, there's no official solution.据我所知,没有官方解决方案。 However, there is an open-source project, google-drive-ocamlfuse , which allows you to mount Google Drive onto your VM without much effort.但是,有一个开源项目google-drive-ocamlfuse ,它允许您轻松地将 Google Drive 安装到您的 VM 上。 Perform the installation as described on the main page, and then follow these steps for headless usage and authorization. 按照主页上的说明执行安装,然后按照这些步骤进行无头使用和授权。

In addition to the above, My Drive can be accessed in a GCP Linux compute instance via several other tools: https://itsfoss.com/use-google-drive-linux/除了上述之外,还可以通过其他几种工具在 GCP Linux 计算实例中访问我的云端硬盘: https://itsfoss.com/use-google-drive-linux/

The details of how the access is performed varies, but the end result is that My Drive will essentially appear in your Linux file system.执行访问的细节各不相同,但最终结果是“我的云端硬盘”基本上会出现在您的 Linux 文件系统中。

Be careful, however, because these programs may have bugs that can delete everything in My Drive (I had this happen with InSync -- I did the trial run then uninstalled and deleted the InSync folder, then later re-installed. After re-install InSync saw that the folder was deleted, so it thought I wanted to delete everything in My Drive -- that was a very bad day.)但是要小心,因为这些程序可能有错误,可以删除我的驱动器中的所有内容(我在 InSync 中发生过这种情况——我进行了试运行,然后卸载并删除了 InSync 文件夹,然后重新安装。重新安装后InSync 看到该文件夹已被删除,所以它认为我想删除我的驱动器中的所有内容——那是非常糟糕的一天。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在不下载服务帐户凭据的情况下从 Google Compute Engine 和本地验证 Google API(Google Drive API)? - How to authenticate Google APIs (Google Drive API) from Google Compute Engine and locally without downloading Service Account credentials? 无法访问谷歌云计算引擎上的 Jenkins - Unable to access Jenkins on compute engine on google cloud 如何从 Google Compute Engine 连接到 MongoDB Atlas? - How to connect to MongoDB Atlas from Google Compute Engine? 谷歌计算引擎无法访问虚拟机 - Google Compute Engine Unable to Access VM 谷歌云平台 - mySQL 访问被公共 IP 的计算引擎实例拒绝 - google cloud platform - mySQL access denied from compute engine instance with public IP 从 App Engine 和外部连接到 Google Compute Engine 上的 MySQL - Connect to MySQL on Google Compute Engine from App Engine and externally 如何在 Google Compute Engine 中触发命令 - How to trigger a command in Google Compute Engine 如何增加谷歌计算引擎内存和磁盘 - How to increase Google compute engine RAM and Disk 如何移植谷歌计算引擎实例? - How to port forward Google Compute Engine Instance? 如何使 ssh 从谷歌计算引擎隧道连接到数据库服务器,并尝试从谷歌云运行连接 - How to make ssh tunneling from google compute engine to database server, and try to connect from google cloud run
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM