0

I was following guidelines and tried to connect heroku to a github repo within our own corporate github (the github url differs from the standard one). Yet, I couldn't find a proper way to do so – clicking on this button would redirect me to github.com, and not git.companyname.com:

enter image description here

Any suggestions on how to tackle this issue? Do I need to go to internal github and manually add heroku as OAuth application?

osowskit
  • 5,904
  • 2
  • 29
  • 38
wintermute
  • 488
  • 1
  • 9
  • 22
  • 1
    You may need to do this in GitHub https://developer.github.com/guides/automating-deployments-to-integrators/ – osowskit Sep 21 '16 at 05:18
  • thank you, @osowskit. Yes, I've figured that. Why wouldn't you submit your comment as an answer, so you could get extra kudos? – wintermute Sep 23 '16 at 17:16

2 Answers2

2

I was researching this as well, and found a workaround: add your heroku repo as a remote, and the code can auto deploy once you pushed to that remote:

git remote add heroku https://git.heroku.com/your-repo.git

Then you should be able to push to it via:

git push heroku master

And your code will be auto-deployed.

Lotonoro
  • 61
  • 3
1

As it turned out, Heroku does not integrate well with internal enterprise github. In my case I have two remote destinations in my git: one is for github, another one is for heroku, and I push the code changes to both remote endpoints.

wintermute
  • 488
  • 1
  • 9
  • 22