SCP File from local to Heroku Server

后端 未结 5 579
温柔的废话
温柔的废话 2021-02-07 08:41

I\'d like to copy my config.yml file from my local django app directory to my heroku server, but I\'m not sure how to get the user@host.com format for heroku.

I\'ve tri

5条回答
  •  深忆病人
    2021-02-07 09:15

    This is a bit late to answer this question, but I use services like localtunnel - https://localtunnel.github.io/www/ to copy files from local machine to heroku.

    First, run a python HTTP server in the directory where the file is located.

    cd /path/to/file
    python3 -m http.server
    

    This starts a server in port 8000. Configure localtunnel to connect to that port.

    lt -s mylocal -p 8000
    

    Now from your heroku machine, you can fetch the file via curl.

    curl -XGET http://mylocal.localtunnel.me/myfile.txt > myfile.txt
    

提交回复
热议问题