Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://[email protected]/xxx/xxx.git: session is down

Tags:

ssh

eclipse

egit

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

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

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://[email protected]/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
like image 561
punkle Avatar asked Jan 25 '12 13:01

punkle


People also ask

How do you fix fatal could not read from remote repository please make sure you have the correct access rights and the repository exists?

The Git “fatal: Could not read from remote repository” error occurs when there is an issue authenticating with a Git repository. This is common if you have incorrectly set up SSH authentication. To solve this error, make sure your SSH key is in your keychain and you connecting to a repository using the correct URL.

Can't connect to any repository error in eclipse?

Your comment on this answer:Go to Window -> Preferences -> Team -> Git -> Configuration, click 'Repository Settings' tab and paste your GIT ssh URI to remote. origin.


1 Answers

I experienced the same issue. Resolution follows:

  • 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.

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.

like image 111
FFL Avatar answered Oct 11 '22 16:10

FFL