出现以下错误时,如何推送到Git Repo:在push期间发生内部异常:ssh://git@github.com/xxx/xxx.git:会话已关闭 [英] How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://git@github.com/xxx/xxx.git: session is down

查看:592
本文介绍了出现以下错误时,如何推送到Git Repo:在push期间发生内部异常:ssh://git@github.com/xxx/xxx.git:会话已关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近设置了一个github帐户来存储我一直在研究的项目的源代码。

I recently set up a github account to store the source code of a project I have been working on.

我正在使用 egit eclipse 插件,将更改推送到 github

I am using egit eclipse plugin to push changes to github.

我成功地推动了初始代码和2个后续更改。然而,当我试图推动第三个变化时,我无法实现。以下excepiton出现在eclipse错误日志中。

I successfully pushed the initial code and 2 subsequent changes. However when I attempted to push the third change I was not able. The following excepiton appears in the eclipse error log.

如果有人可以告诉我这个错误的原因,或者告诉我如何调试问题,一个很好的帮助。

If someone could tell me the cause of this error, or tell me how I can go about debugging the problem it would be a great help.

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of push command
    at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)
    at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:227)
    at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:145)
    at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:202)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git@github.com/xxx/xxx.git: session is down
    at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:154)
    at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118)
    at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91)
    at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:306)
    at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:152)
    at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
    at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
    at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:152)
    ... 4 more
Caused by: com.jcraft.jsch.JSchException: session is down
    at com.jcraft.jsch.Session.openChannel(Session.java:750)
    at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:147)
    ... 11 more


推荐答案

我遇到同样的问题。解决方法如下:

I experienced the same issue. Resolution follows:


  • 在远程( Eclipse视图)中删除原始推送和获取 - > Git存储库)。

  • 关闭Eclipse。

  • 转到 .ssh 用户/ .ssh)并删除密钥文件( public 私有)。

  • 启动eclipse并重新生成密钥(窗口 - >首选项 - >常规选项卡 - >网络连接 - > SSH2 )。

  • 复制密钥并将其添加到 github / SSH

  • 在Eclipse中添加新的远程和即可。

  • Delete origin push and fetch in remote(Eclipse view --> Git repositories).
  • Close Eclipse.
  • Go to .ssh folder(Users/.ssh) and delete the key files(public and private).
  • Start eclipse and regenerate the keys(Window --> Preferences --> General tab --> Network connections --> SSH2).
  • Copy the key and add it to github/SSH Keys
  • In Eclipse add new remote and push.

修改
您可能不需要删除所有的关键文件。如果您以前已经添加了一个密钥文件(也许在设置本机Git的时候),可以在密钥列表中添加该文件的名称,这样可以正常工作。

Edit You may not need to delete all the key files. If you have already added a key file previously (perhaps while setting up native Git), you can just add the name of that file in list of keys, and it will work.

这篇关于出现以下错误时,如何推送到Git Repo:在push期间发生内部异常:ssh://git@github.com/xxx/xxx.git:会话已关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆