62

When I deploy my application on Heroku server, the server generate an app automatically and I found on my resource a git url. Example: [email protected]:myapp-ss-1338.git. How can I access this url to view source code or folder via a web browser?

Pigueiras
19.5k10 gold badges67 silver badges87 bronze badges
asked Apr 2, 2013 at 5:48
4
  • 6
    AFAIK you can't, heroku it's not like github or bitbucket. Commented Apr 2, 2013 at 6:50
  • That mean there is no way to see inside a heroku app (without checkout )? Commented Apr 2, 2013 at 6:57
  • With a web browser no, but you can do a clone of the repository in Heroku, or if you simply want to know what revision is deployed in Heroku you can look at this question: stackoverflow.com/questions/2281772/…. Also there is an option to run heroku run bash, and see the files uploaded to the server (I have never tested it, so I can't assure you that this options it's going to work). Commented Apr 2, 2013 at 7:04
  • 3
    If my server create a new folder or file, lets say a image uploaded by the client, is there anyway to see what folder? It looks like "heroku run bash" only show what you uploaded to the server. Commented Sep 4, 2014 at 14:58

2 Answers 2

135

heroku run bash is the best way to see what is actually deployed to dynos. As for the git repo you should treat it more like a way to deploy your app (and so therefore ephemeral) than a place to store your code.

There is no way to view what is in that repo from your web browser.

If you want to get at the files in the Heroku repo you can do so by doing a git clone [repo address].

Scimonster
33.4k10 gold badges79 silver badges92 bronze badges
answered Apr 2, 2013 at 20:08
Sign up to request clarification or add additional context in comments.

2 Comments

For me, the command: heroku git:clone -a myapp worked where myapp is the name of the app you are trying to access.
can't we access this heroku application code using gitweb or what if we have control of heroku's source code is it possible in this situation, may be we can create some plugin to view the source code over browser, I'm new into this please put a light hear
2

If necessary, you might be able to clone your app’s source from its Heroku Git repository using the heroku git:clone command:

$ heroku git:clone -a myapp

Replace myapp with the name of your app.

This command creates a copy of the Heroku-hosted repository that contains your app’s source and complete repository history. It also includes a heroku Git remote to simplify future pushes.

answered Jun 15, 2020 at 11:39

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.