How can I specify a gem to pull from a private github repository?

前端 未结 8 2302
攒了一身酷
攒了一身酷 2020-12-02 07:51

I have a private repository on Github that I want to use. I deploy my app to Heroku. How can I specify a private repository as the source on my gemfile? I imagine it wouldn\

8条回答
  •  无人及你
    2020-12-02 08:10

    • Create a ssh keys
    • Make sure those keys under ~/.ssh directory
    • Copy content of ~/.ssh/id_rsa.pub into https://github.com/MY_COMPANY/MY_GEM/settings/keys
    • In your Gemfile use: gem 'mygem', github: 'MY_COMPANY/MY_GEM'
    • run bundle install

提交回复
热议问题