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

前端 未结 8 2326
攒了一身酷
攒了一身酷 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:19

    I found that if I have access from my terminal to github (by uploading an ssh key to github), I can simply do:

    gem 'my_gem', :git => 'git@github.com:my_user/my_repo.git', :ref => 'revision_no'
    

    without polluting my code with my git username or password

提交回复
热议问题