Heroku pull private github repository

后端 未结 2 1305
梦谈多话
梦谈多话 2021-02-02 01:09

I have tryed different approaches to use a Github private repository reference in a Rails application Gemfile.

1) Gemfile:
gem \'my_gem\', :git          


        
2条回答
  •  一生所求
    2021-02-02 01:38

    Heroku runs an older Git version, which unfortunately doesn't fully support the auth part of the URLs.

    You can work around this by adding the dummy password supplied by GitHub. So instead of using:

    https://#{github_oauth_token}@github.com/me/my_gem.git
    

    Use:

    https://#{github_oauth_token}:x-oauth-basic@github.com/me/my_gem.git
    

提交回复
热议问题