使用 Codenvy 推送到 GitHub 时出现问题:"Can't store ssh key. Unable get private ssh key."

Problem pushing to GitHub with Codenvy: "Can't store ssh key. Unable get private ssh key."

我正在为我的 rails 应用程序使用 Codenvy。当我 运行 git push -u origin --all 使用我的 rails 应用程序时,我得到一个空白终端。当我使用 Git > Remotes > Push menu 推送时,出现错误“Can't store ssh key. Unable get private ssh key."

这是OAuth的问题吗,因为我还没有设置。我尝试按照 Codenvy git 文档进行操作,但他们没有提供有关填写 <HOST_IP><SERVER_PORT><CHE_HOST_IP>yourClientSecret 和 [= 内容的信息22=]参数。我遵循了许多尝试将我的 Codenvy 应用程序连接到 GitHub 的在线教程,其中 none 已经成功。我似乎找不到一种明确的方法来做到这一点。我是 Codenvy 的新手,你能给我解释一下吗?

复制步骤: 我已经:

更新: 我已通过 git 原点修复,现在当我 运行 git push -u origin -all 时,我收到以下错误:

! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/Git-Ibraheem/toy_app.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

使用 Codenvy Git 菜单时,出现同样的错误:

failed to push 'master -> master' to 'https://github.com/Git-Ibraheem/toy_app.git'. Try to merge remote changes using pull, and then push again.

当我 运行 git pull origin master 我得到以下信息:

error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.`

修复: 我 运行 命令 git reset --hard HEAD 然后 git push -u origin --all。这是成功的!

using git remote add origin git@bitbucket.org:/

应该是完整的URLgit@bitbucket.org:/MyAccount/MyRepo

Generated an SSH key using VCS under the host name "github.com" and added the public ssh to my GitHub account

那个...与 bitbucket 没有任何关系(您刚才提到的 "origin")。

Is this a problem with OAuth,

如果您使用的是 SSH,则不涉及 OAuth,所以不需要。