【发布时间】:2010-10-29 15:54:39
【问题描述】:
这个问题和我在understanding rebase, branch and merge的问题有关, 并解决问题
当您的远程列表中有一个 teamMate 时,您如何提交到您的 github 帐户?
我发现other people 也有同样的问题。 问题似乎与/etc/xinet.d/有关。
问题:无法将我的本地分支推送到我在 Github 的主分支
我跑
git push origin master
我明白了
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
错误消息提示我分支 'origin' 不在我的本地 git 存储库中。这样,Git 就会停止连接到 Github。
这很奇怪,因为我没有删除分支'origin'。
我的 git 树是
dev
* master
ticgit
remotes/Math/Math
remotes/Math/master
remotes/origin/master
remotes/Masi/master
如何将本地分支推送到 Github,而您的本地 Git 中有 teamMate 的分支?
VonC 的回答解决了主要问题。 我为我的 ssh 密钥设置了密码。
我跑
$git push github master
我明白了
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
看来我需要以某种方式为 Git 提供密码。
如何让 Github 询问您的密码而不是依赖 ssh 密钥?
【问题讨论】:
-
刚刚更新了我的答案。 ssh 参数不是全部。 user.name 和 github.user 也很重要
-
再次更新了我的答案,进行了更多的 ssh 配置检查
-
“权限被拒绝(公钥)。”实际上意味着您尝试使用您的公钥登录,但权限被拒绝,而不是不允许访问您的公钥。
-
我的问题是来自不同系统的不同 ssh 密钥。我上传了另一个密钥,一切都很好。我用 ssh -v git@github.com 技巧发现了它。
标签: git version-control push