谷歌中国开发者社区 (GDG)
  • 主页
  • 博客
    • Android
    • Design
    • GoogleCloud
    • GoogleMaps
    • GooglePlay
    • Web
  • 社区
    • 各地社区
    • 社区历史
    • GDG介绍
    • 社区通知
  • 视频
  • 资源
    • 资源汇总
    • 精选视频
    • 优酷频道

用 Google Cloud 打造你的私有免费 Git 仓库

2016-04-28Guokai HanGoogleCloud2 comments

屏幕快照 2016-04-28 下午3.39.39

作为开发者平时可能想写点(非开源)的小东西,或者想保存一些私人配置什么的,这些也应该以 Git 的形式长期保存。毕竟 Git 的用途很广,有一份云端备份也很明智。但 Github 等服务只对开源项目免费,私有项目是按月收费的,并且还有仓库数量限制。自己的一些小作品或个人记录一般没有多大商业价值,项目本身又非常小,所以不值得花钱购买 Git 服务,但又不太适合公开。这种情况下你就需要一些可靠的免费私有 Git 仓库了。

其实,Google 云平台上有一个 Cloud Source Repositories 服务,这就是我们需要的私有 Git 仓库功能。这个服务本意是让你的项目方便地在 Google Cloud 上集成和调试,但是你也可以只使用这个服务,当成你的免费私有仓库。以前 Google Cloud 中一个项目只能有一个仓库,用起来不方便,现在一个项目中可以建任意多个私有仓库了。Cloud Source Repositories beta 版服务是完全免费的,存储上限是 1 G ,一般存储源码等文本文件是足够用的。

除了私有、免费之外,Cloud Source Repositories 还有以下优点:

  • 作为 Google 的服务,存储绝对安全、可靠。
  • 一个 Cloud 项目下可以创建任意多个仓库。
  • 支持代码编辑器,可以用浏览器在线查看、编辑、提交和仓库管理。
  • 可以多人协作,访问私有仓库。
  • 支持 GitHub 和 Bitbucket 仓库同步。
  • 与 Google Cloud 的其它服务无缝集成。

使用方法和标准 Git 没有不同,唯一的差异是初始的账号认证方式不同。假设你已经本地安装了 Git ,然后你需要安装 Google Cloud SDK (一个命令行工具) 来初始化项目和账号认证,仅第一次需要。当然,你还需要在 Google Cloud 上新建一个项目作为服务的归属,并设置你的收费方式(不使用其他收费服务的话不用担心扣费)。具体 Git 服务的使用 Google 官方文档已经写地非常细致了,控制台上也一目了然(Git 服务是控制台菜单中的 Development)。

官网链接:https://cloud.google.com/source-repositories/

回答几个问题:1. 存储上限已提升为 1G 。2. 仓库数量和协作者数量没有限制。3. 和使用标准 Git 完全一样,只是初始的账号认证的方式不同。4. Git 服务完全免费,只要不使用 Cloud 中的其它收费业务就不会扣费。5. vpn 或 proxychains 可以帮你解决的第一步。

本文作者:Guokai Han。

除非特别声明,此文章内容采用知识共享署名 3.0许可,代码示例采用Apache 2.0许可。更多细节请查看我们的服务条款。

2 comments. Leave new

vincgao
2016-04-29 09:24

特别赞!一会去试一下 :)

Reply
李少杰
2016-12-14 14:00

赞?

Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Recent Posts

  • Congratulations to our US Grow with Google Developer Scholars!
  • Cloud SQL for PostgreSQL now generally available and ready for your production workloads
  • Exploring container security: Protecting and defending your Kubernetes Engine network
  • BigQuery arrives in the Tokyo region
  • What’s new in Firebase Authentication?

Recent Comments

  • 鸿维 on Google 帐号登录 API 更新
  • admin on 推出 CVPR 2018 学习图像压缩挑战赛
  • Henry Chen on 推出 CVPR 2018 学习图像压缩挑战赛
  • 王中 on Google 推出的 31 套在线课程
  • Francis Wang on Google 推出的 31 套在线课程

Archives

  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • January 1970

Categories

  • Android
  • Design
  • Firebase
  • GoogleCloud
  • GoogleDevFeeds
  • GoogleMaps
  • GooglePlay
  • Google动态
  • iOS
  • Uncategorized
  • VR
  • Web
  • WebMaster
  • 社区
  • 通知

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

最新文章

  • Congratulations to our US Grow with Google Developer Scholars!
  • Cloud SQL for PostgreSQL now generally available and ready for your production workloads
  • Exploring container security: Protecting and defending your Kubernetes Engine network
  • BigQuery arrives in the Tokyo region
  • What’s new in Firebase Authentication?
  • Showcase your innovations at the 2018 China-US Young Makers Competition
  • Protecting WebView with Safe Browsing
  • Protecting WebView with Safe Browsing
  • Dialogflow Enterprise Edition is now generally available
  • Improving the Google Cloud Storage backend for HashiCorp Vault

最多查看

  • 谷歌招聘软件工程师 (19,918)
  • Google 推出的 31 套在线课程 (18,087)
  • 如何选择 compileSdkVersion, minSdkVersion 和 targetSdkVersion (14,903)
  • Seti UI 主题: 让你编辑器焕然一新 (11,117)
  • Android Studio 2.0 稳定版 (8,419)
  • Android N 最初预览版:开发者 API 和工具 (7,752)
  • 像 Sublime Text 一样使用 Chrome DevTools (5,611)
  • Google I/O 2016: Android 演讲视频汇总 (5,387)
  • 用 Google Cloud 打造你的私有免费 Git 仓库 (4,896)
  • 面向普通开发者的机器学习应用方案 (4,734)
  • 生还是死?Android 进程优先级详解 (4,709)
  • 面向 Web 开发者的 Sublime Text 插件 (4,002)
  • 适配 Android N 多窗口特性的 5 个要诀 (3,838)
  • 参加 Google I/O Extended,观看 I/O 直播,线下聚会! (3,419)
© 2018 中国谷歌开发者社区 - ChinaGDG