Search code examples
herokussh

work remotely on heroku with vscode and commit changes


I want to code directly on production with VSCode, make some changes, and commit them (for fast prototyping, not a live server). I'm testing responses from external services, so I need a publicly-accessible URL.

Is that possible with heroku?

When I SSH intro Heroku from a terminal, I can't git commit cause I get fatal: not a git repository

Also, running heroku ps:exec on VSCode remote extension pack doesn't work.


Solution

  • No, this is not possible on Heroku without some very awkward hoop-jumping. Heroku is a platform-as-a-service provider, not a remote workstation.

    I'm testing responses from external services, so I need a publicly-accessible URL

    Your best bet may be to use something like ngrok or localtunnel.

    These tools let you temporarily route traffic from a publicly-accessible address to your local development environment. At a high level, it looks something like this:

    • Start your development server locally
    • Start ngrok or localtunnel locally
    • Take the publicly-accessible URL the tool gives you and tell the external service to use it