简体   繁体   English

在Windows 7 64位上的travis setup heroku命令

[英]travis setup heroku command on Windows 7 64 bit

Hi there I'm trying to deploy my python app using Travis CI but I'm running into problems when I run the "travis setup heroku" command in the cmd prompt. 嗨,我正在尝试使用Travis CI部署python应用程序,但是在cmd提示符下运行“ travis setup heroku”命令时遇到了问题。

I'm in my project's root directory, there is an existing ".travis.yml" file in that root directory. 我在项目的根目录中,该根目录中有一个现有的“ .travis.yml”文件。

I've also installed ruby correctly and travis correcty because when I run: 我还正确安装了ruby并正确安装了travis,因为在运行时:

  • "ruby -v" I get "ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]" “ ruby​​ -v”我得到“ ruby​​ 2.2.2p95(2015-04-13修订版50295)[x64-mingw32]”
  • "travis -v" I get "1.7.7" “ travis -v”我得到“ 1.7.7”

When I run "travis setup heroku" I get this message "The system cannot find the path specified" then prompts me for a "Heroku API token:" 当我运行“ travis setup heroku”时,收到此消息“系统找不到指定的路径”,然后提示我输入“ Heroku API令牌:”

What's the issue? 怎么了

If you hadn't had Heroku Toolbelt setup to the $PATH environment variable during installation, here are some steps to check: 如果在安装过程中没有将Heroku Toolbelt设置为$ PATH环境变量,请执行以下步骤:

  • Check if Heroku toolbelt is set in PATH variable. 检查是否在PATH变量中设置了Heroku工具带。 If not, cd to your Heroku toolbelt installation folder, then click on the address bar and copy it. 如果没有,请CD到您的Heroku工具带安装文件夹,然后单击地址栏并复制它。
  • Go to the Control Panel, then click System and Advanced System Protection. 转到“控制面板”,然后单击“系统和高级系统保护”。
  • Go to Environment Variables, then look for $PATH in the System Variables 转到环境变量,然后在系统变量中查找$ PATH
  • After the last program in the variable, put a ; 在变量的最后一个程序之后,放置一个; then paste in your Heroku CLI folder and click OK. 然后粘贴到您的Heroku CLI文件夹中,然后单击“确定”。 (This requires cmd to be restarted manually) (这需要手动重新启动cmd
  • Login to Heroku CLI 登录到Heroku CLI
  • grab the token key from heroku auth:token heroku auth:token获取令牌密钥
  • run travis setup heroku if the setup goes smoothly, you shouldn't get the command not found and prompt you for heroku auth key. 如果设置顺利进行,请运行travis setup heroku ,您不应获取未找到的命令,并提示您输入heroku身份验证密钥。 It will ask that you want to encrypt the auth key (highly recommend) and verify the information you provided with the toolbelt and Travis CLI. 它将询问您是否要加密身份验证密钥(强烈建议),并验证工具带和Travis CLI随附的信息。
  • commit changes 提交更改
  • you should be able to get your app up and running within your tests. 您应该能够在测试中启动并运行您的应用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM