【问题标题】:fatal: Invalid refspec (Heroku nodejs)致命:无效的参考规范(Heroku nodejs)
【发布时间】:2018-10-09 08:59:40
【问题描述】:

我在运行时收到此错误:

git push heroku master
fatal: Invalid refspec ' https://git.heroku.com/damp-reef-82414.git'


Heroku Git URL - https://git.heroku.com/lit-earth-17372.git
https://lit-earth-17372.herokuapp.com/

https://git.heroku.com/damp-reef-82414.git 之前是 heroku 上的目录, 当前文件夹通过 herolu create 命令的链接是https://lit-earth-17372.herokuapp.com/

.git/config

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "abc"]
    url = https://git.heroku.com/lit-earth-17372.git
    fetch = +refs/heads/*:refs/remotes/abc/*
[remote "origin"]
    fetch = refs/heads/*:refs/remotes/origin/*

【问题讨论】:

  • 您能否尝试清楚您的问题是什么,也许您可​​以提供您收到的错误消息。
  • 您是否尝试调整您的heroku 遥控器使其指向lit-earth-17372 而不是damp-reef-82414
  • 是的,我之前有 'damp-reef-82414' 域,'lit-earth-17372' 是当前的@Chris
  • 在heroku上推送它时我遇到了这个错误。 'damp-reef-82414' 是之前其他项目的域之一,很久以前就被删除了,lit-earth-17372 是当前的@antzshrek
  • @Kapoor,您尝试过 VonC 的建议吗?我想他可能有解决办法。

标签: node.js github heroku


【解决方案1】:

我看到' https://git.heroku.com/damp-reef-82414.git' 开头有一个空格。

以防万一这是某种拼写错误,请尝试:

cd /path/to/my/local/repo
git remote set-url heroku https://git.heroku.com/damp-reef-82414.git

如果需要,可以使用相同的命令切换到https://git.heroku.com/lit-earth-17372.git

【讨论】:

  • 同样的错误:命令:git remote set-url heroku git.heroku.com/lit-earth-17372.git 结果:致命:无效的 refspec 'git.heroku.com/damp-reef-82414.git'
  • @Kapoor 我仍然在其中看到一个空格:你能用你的仓库中的git config --edit 编辑它吗?
  • in .git/config url 是当前的,但它仍然指的是其他一些链接。我已经上传了 .git/config(上面的问题)你能检查一下吗。
  • @Kapoor 我有。你能添加一个 url 到 origin,以防万一吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-12-21
  • 2015-03-01
  • 2021-02-09
  • 1970-01-01
  • 2016-05-14
  • 1970-01-01
  • 2020-12-05
相关资源
最近更新 更多