在 bitbucket 上使用 git 部署到 Heroku [英] Deploying to Heroku using git on bitbucket

查看:25
本文介绍了在 bitbucket 上使用 git 部署到 Heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 git 在 bitbucket 上托管我的源代码,因为我显然得到了一个免费的私有仓库,而且我想使用 bitbucket 的源代码在 heroku 上托管我的应用程序.

I want to host my source on bitbucket using git because I obviously get a free private repo and I want to host my app on heroku using the source code from bitbucket.

我可以使用 github 客户端和 heroku 工具带来实现吗?它会起作用吗?Github 很棒,但我不想让每个人都看到我的代码,而且我不想为私人回购付费,因为它是一个小项目.

Can i do it using the github client and heroku toolbelt. Will it work? Github is great but i dont want everyone seeing my code and I dont want to pay for a private repo because its a small project.

推荐答案

部署到 Heroku 应该可以工作,无论您将代码托管在何处,因为 Heroku CLI 为部署添加了它自己的 git remote.实际上,您甚至可以从 Heroku 中 git pull,因此从技术上讲,您可以将 Heroku 用作私有 git 存储库(尽管不推荐).至于使用GitHub客户端连接bitbucket,只需在客户端的设置选项卡中将repository remote改为bitbucket提供的URL即可.

Deploying to Heroku should work regardless of where you host your code as the Heroku CLI adds it's own git remote for the sake of deployments. In fact, you can even git pull from Heroku, so you could technically use Heroku as a private git repository instead (though not recommended). As for using the GitHub client to connect to bitbucket, simply change the repository remote to the URL provided by bitbucket in the settings tab of the client.

这篇关于在 bitbucket 上使用 git 部署到 Heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆