0

我是一个 Windows 用户,一直在学习 Michael Hartl 的 Ruby on Rails 教程(http://ruby.railstutorial.org/chapters/ruby-on-rails-tutorial),我一直在完美地遵循一切,直到我尝试使用以下命令将应用程序部署到heroku:

sample_app>git push heroku master
fatal: No path specified. See 'man git-pull' for valid url syntax

我看过类似的问题,所有建议的修复都对我不起作用。一些可能有用的附加信息:

sample_app>git remote -v
heroku  [git@heroku.com:oscure-dawn-8059.git] (fetch)
heroku  [git@heroku.com:oscure-dawn-8059.git] (push)
origin  [git@github.com:hassankbrian/sample_app.git] (fetch)
origin  [git@github.com:hassankbrian/sample_app.git] (push)

以下是 .git/config 的内容:

[user]
        name =  Brian   
        email = hassankbrian@gmail.com
[core]
        repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[branch "master"]
[remote "origin"]
    url = [git@github.com:hassankbrian/sample_app.git]
    fetch = +refs/heads/*:refs/remotes/origin/*
[remote "heroku"]
    url = [git@heroku.com:oscure-dawn-8059.git]
    fetch = +refs/heads/*:refs/remotes/heroku/*
[heroku]
    remote = heroku
4

1 回答 1

1

这与使用“ssh://”前缀和存储库名称中的相对语法的组合有关。似乎与使用的 gitolite 有关。没有斜线加上“ssh://”前缀似乎混淆了它。

  • ssh://git@server:relative - 否
  • git@server:relative - 是
  • ssh://git@server/relative - 也许(gitolite 对此很满意)
  • ssh://git@server:/relative - 也许(gitolite 对此很满意)
  • ssh://git@server/absolute - 是

希望这可以帮助。

于 2014-05-17T07:06:37.947 回答