bitbucket private repository on heroku

前端 未结 4 2054
遇见更好的自我
遇见更好的自我 2021-02-02 17:42

I have a rails app which requires a gem. I host this gem on bitbucket in a private repository.

In my Gemfile I added the gem like following:

gem \"my-gem         


        
4条回答
  •  佛祖请我去吃肉
    2021-02-02 18:23

    The proper way to achieve this is using bundle config, which saves the configuration on your home directory .bundle/config so it stays outside the repo.

    bundle config bitbucket.org user:pwd

    And then on Heroku you have to set a simple configuration in a special way:

    heroku config:set BUNDLE_BITBUCKET__ORG=user:pwd

    And in your Gemfile you just use the URL without the credentials.

    gem 'gemname', git: "https://bitbucket.org/User/gemname.git"

提交回复
热议问题