我的Lion机器上有这个应用程序,它在mercurial存储库中,所以我使用hg-git将它部署到heroku。
~/.hgrc
[extensions]
hgext.bookmarks =
hggit =.../project/.hg/hgrc
[paths]
default = https://validhgrepo.com
[alias]
push-heroku = push git+ssh://git@heroku.com:appname.git然后,当我运行hg push-heroku时,它应该被部署,但我得到:
caseys-MacBook-Air:project casey$ hg push-heroku
pushing to git+ssh://git@heroku.com:appname.git/
creating and sending data
["git-receive-pack 'appname.git/'"]
! Invalid path.
! Syntax is: git@heroku.com:<app>.git where <app> is your app's name.
abort: git remote error: The remote server unexpectedly closed the connection.这没有任何意义。我觉得这个错误消息是误导性的,因为该存储库确实存在。
同样,这在我的ubuntu机器上也运行得很好,也有类似的设置。
发布于 2012-02-23 15:13:05
事实证明这与这个issue有关。我以前没有注意到额外的斜杠。我应用了一个类似于这个guy的补丁,它对我有效(在最新的hg,hg-git和osx上)。
有关如何安装修补程序的完整详细信息,请访问:
sudo easy_install -m‘hg-git’
~/Library/Python/2.7/site-packages/hg_git..../hggit/git_handler.py
- git_handler.py清华Jul 28 22:05:45 2011清华Jul 28 22:11:44 2011 @@ -1066,6 +1066,8 @@ port = None host,path = hostpath.split(hostpath_seper,1) + if (host.find('heroku') > 0):+ path = path.rstrip( '/‘) if hostpath_seper == '/':传输路径=’/‘+ path else:
发布于 2012-02-22 17:29:14
你的git远程格式搞砸了。
在.git/config中,确保遥控器采用以下格式:
git@heroku.com:appname.git其中appname是您在Heroku上的应用程序名称
https://stackoverflow.com/questions/9388317
复制相似问题