【发布时间】:2016-05-24 12:18:20
【问题描述】:
我正在遵循本教程https://www.railstutorial.org/book/static_pages#sec-sample_app_setup 并成功完成了所有步骤(git 提交和在 github 上推送、heroku 登录和 heroku 应用程序创建),直到这个命令:
$ git push heroku master
我也试过了:
$ git push heroku origin
$ git push heroku
它导致了这个错误:
> fatal: No path specified. See 'man git-pull' for valid url syntax
我试图通过关注this answer 来解决它,但它对我不起作用。
在我尝试了最佳答案的建议后,这是我在 .git 中的配置文件:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/kunokdev/sample_app.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "heroku"]
url = https://git.heroku.com/test774.git
fetch = +refs/heads/*:refs/remotes/heroku/*
任何想法是什么问题?我使用的是 Ubuntu 14.04 操作系统。
$ git config --list | grep heroku
url.ssh://git@heroku.com.insteadof=https://git.heroku.com/
remote.heroku.url=https://git.heroku.com/test774.git
remote.heroku.fetch=+refs/heads/*:refs/remotes/heroku/*
【问题讨论】:
-
试试“git push heroku master”
-
@AkramFares 同样的错误。
-
这个命令“git fetch --all --tags”返回什么?
-
@AkramFares 输出:
Fetching herokuNEXT LINEfatal: No path specified. See 'man git-pull' for valid url syntaxNEXT LINEerror: Could not fetch herokuNEXT LINEFetching origin -
"致命:未指定路径。请参阅 'man git-pull' 了解有效的 url 语法" 这告诉您 git-pull 失败。要缩小问题范围,请尝试从命令行执行 git pull master,查看它是否在本地失败。请注意:“由于 pull 会对检索到的更改执行合并,因此您应该确保在运行 pull 命令之前提交本地工作。”