【问题标题】:Github multiple account issueGithub 多账号问题
【发布时间】:2012-12-07 19:38:29
【问题描述】:

当我尝试做这样的事情时::
git push git@github-client:antonyr/Spring-Hibernate.git
我得到如下内容

No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
error: failed to push some refs to 'git@github-client:antonyr/Spring-Hibernate.git'

顺便说一下,我已经使用 SSH 为 github.com 设置了多个帐户。

请帮忙。

【问题讨论】:

  • “也许你应该指定一个分支,比如'master'。”

标签: git ssh github


【解决方案1】:

您必须指定要推送的分支。推送master

$ git push git@github-client:antonyr/Spring-Hibernate.git master

【讨论】:

  • 我仍然遇到同样的错误。当前登录的 SSH 帐户是用户 abc。现在我想在 github.com 上使用另一个名为 antonyr 的帐户
【解决方案2】:

在推送到 git 之前使用以下命令 $ git push origin master

它应该工作。

【讨论】:

    猜你喜欢
    • 2018-09-17
    • 1970-01-01
    • 1970-01-01
    • 2014-02-11
    • 2022-11-11
    • 2012-11-13
    • 1970-01-01
    • 2020-08-09
    • 2018-07-29
    相关资源
    最近更新 更多