问题描述
我想将config.yml文件从本地django应用程序目录复制到heroku服务器,但是我不确定如何获取heroku的[email protected]格式.
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 [email protected] format for heroku.
我尝试过运行"heroku run bash"
I've tried running 'heroku run bash'
scp /home/user/app/config.yml
我不确定如何从中获取它
I'm not sure how I can get it in the
scp [email protected]:/home/user/dir1/file.txt [email protected]:/home/user/dir2'
格式
推荐答案
正如@ tamas7所说,它已被防火墙保护,但您的本地计算机也可能已被防火墙保护.因此,除非您拥有可从Internet访问的带有SSH的专用服务器,否则您将无法进行scp.
As @tamas7 said it's firewalled, but your local machine is probably also firewalled. So unless you have a private server with SSH accessible from the Internet, you won't be able to scp.
我个人免费使用 transfer.sh 和开源服务.
I'm personally using transfer.sh free and open source service.
将您的config.yml
上载到它:
$ curl --upload-file ./config.yml https://transfer.sh/
https://transfer.sh/66nb8/config.yml
然后从所需的任何位置下载回来:
Then download it back from wherever you want:
$ wget https://transfer.sh/66nb8/config.yml
这篇关于从本地到Heroku服务器的SCP文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!