travis setup heroku命令产生存储库未知错误 [英] travis setup heroku command yields repository not known error

查看:87
本文介绍了travis setup heroku命令产生存储库未知错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究 Raild 4 In Action 书.在第13章:部署,第464页上,您正在为travis的部署钩子进行最终配置,以便在通过规格后推送到您的heroku应用程序.

I am working through the Raild 4 In Action book. On Chapter 13: Deployment, page 464 it is having you do the final configuration for a deployment hook for travis to push to your heroku app upon passing specs.

这本书已经让我执行以下操作:

The book already had me do the following:

  • 我在应用程序的根目录中输入了.travis.yml文件.
  • 然后我去https://travis-ci.org/并通过我的Github帐户登录.
  • 然后,我将项目的开关拨到ON位置.
  • 现在,当我执行git push时,我在travis上注意到它进行了构建并运行了我的所有规格.看起来一切都过去了.底部显示Done. Your build exited with 0.
  • I entered the .travis.yml file in the root of my app.
  • I then went to https://travis-ci.org/ and signed in via my Github account.
  • I then flipped the switch to on for my project.
  • Now when I do a git push I notice on travis that it does a build and it runs all my specs. It looks like it all passes. At the bottom it says Done. Your build exited with 0.

好吧,现在将部署钩子与heroku结合起来.

Ok now the deployment hook with heroku.

  • 我要执行gem install travis将宝石放到我的计算机上
  • 然后我使用github令牌执行travis login,它说:Successfully Logged in!
  • I do gem install travis to get the gem onto my computer
  • I then do travis login with a github token and it says: Successfully Logged in!

现在我运行travis setup heroku,这是错误信息:

Now I run travis setup heroku and here is the error:

repository not known to https://api.travis-ci.org/:my_repo_name/my_app_name

这本书没有提及此错误消息.我尝试环顾四周,找不到遇到此问题的任何人.

The book does not mention this error message. I attempted looking around and couldn't find anyone who had run into this problem.

如何获取travis setup heroku命令以执行应做的事情?

How can I get the travis setup heroku command to do what it is supposed to do?

更新

问题是我在Github上的仓库名称是Ticketee,由于某种原因travis-ci认为它是ticketee.答案是从我的应用程序的根目录打开以下文件:

The issue is that my repo's name on Github is Ticketee and travis-ci for some reason thought it was ticketee. The answer was to open up the following file from the root of my app:

vim .git/config

在底部,我看到了以下内容

At the bottom I saw the following

[travis]
    slug = my_git_user_name/ticketee

我不得不将其更改为此:

and I had to change it to this:

[travis]
    slug = my_git_user_name/Ticketee

推荐答案

您似乎遇到了与此要解决此问题,请在您的.git/config文件中添加以下内容:

To solve this issue, add the following in your .git/config file:

[travis]
    slug = <user/org>/<repo>

确保slug与您在Travis中看到的区分大小写的URL结构匹配.

make sure slug matches the case-sensitive URL structure you see in Travis.

这篇关于travis setup heroku命令产生存储库未知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆