【问题标题】:'fatal: remote part of refspec is not a valid name in ..' error when setting up Git [duplicate]'致命:refspec的远程部分不是..中的有效名称'设置Git时出错[重复]
【发布时间】:2014-07-17 00:48:51
【问题描述】:

我正在尝试按照此处的说明使用 WPengine 设置 git:(http://wpengine.com/git/#production) - 但是当我开始执行部署步骤时,我收到以下错误:

% git remote -v  
production  git@git.wpengine.com:production/workshop-wp.git (fetch)
production  git@git.wpengine.com:production/workshop-wp.git (push)
% git push production master ...
fatal: remote part of refspec is not a valid name in ...

【问题讨论】:

  • 您实际上并没有在推送命令中使用...,是吗?

标签: wordpress git refspec


【解决方案1】:

不要将... 放在推送命令中。正确的语法是

git push production master

我知道您链接到的教程中的说明是这样做的:

git push production master ...

但这只是明显不正确

【讨论】:

  • 谢谢,这带来了这个错误:% git push production master FATAL: W any production/workshop-wp robertwilliams-robert_williams DENIED by fallthru (or you mis-spelled the reponame) fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
  • @user1406947 抱歉,当时我不知道您的问题是什么。可能是存储库访问权限问题,或者您可能使用了错误的存储库 URL 等。
【解决方案2】:

我让它工作了。我正在尝试部署我的 GitHub 存储库名称:

$ git remote add production git@git.wpengine.com:production/my_wordpress_app.git

而不是部署我的 wpengine 用户名

$ git remote add production git@git.wpengine.com:production/robertwilliams.git

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-26
    • 1970-01-01
    • 2011-10-28
    • 2021-03-08
    相关资源
    最近更新 更多