0

I have a client who's code hasn't been released by the developers even after the payment, he still has his Heroku account linked with the GitHub repository that contains the code. I tried to recover it using

heroku git:clone -a app_name

however this gets me a much older version of commits that belongs to the master branch and the builds are deployed from /release/1.0 branch. Is there any way I can recover the code without actual access to the Github repo itself?

Sahil
  • 1,387
  • 14
  • 41

1 Answers1

0

So I found a solution to this. There's something called Dyno which runs the code in containers, and I can access a bash shell. Now what it allows me to do is copy whichever file I want from that Dyno instance.

heroku ps:copy tmp/some.log --app app-example-prod --dyno web.1 --output=tmp/some.heroku.log

Obviously I needed to download the entire codebase and doing it file by file would have been tedious. Hence I decided to zip all the files, and upload them to a file sharing server using curl.

zip -r entire-codebase.zip *

curl -F "file=@test.txt" https://file.io/?expires=1h

This returned a JSON string that had the URL from where I could download my codebase.

answer by @Szymon Jez. Here's the link to the official question.

Sahil
  • 1,387
  • 14
  • 41