Heroku pull private github repository

后端 未结 2 1306
梦谈多话
梦谈多话 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
    
    0 讨论(0)
  • 2021-02-02 01:44

    Heroku's git (version 1.7) doesn't support using e-mail as username for Github's repositories.

    You must use your Github username.

    Also, Heroku's git doesn't support using an oauth token.

    Hopefully Heroku will upgrade their git soon, so they can continue making my life easier :-)

    0 讨论(0)
提交回复
热议问题