Introduction:
Main Repo: Repo1.
After forking it, my repo is : ForkedRepo1
In Eclipse-Git, I cloned my ForkedRepo1.
Until Thursday, I was able to commit & push without any issue.
Then suddenly, on Thursday, I got the error:
Cannot get remote repository refs
Reason:
ssh://<forkedrepo1: session.connect:
java.netSocketTimeoutException: Read timed out
I have a SSH key.
Nothing as altered in my system, so I am not sure what happened.
To make matters worse, I deleted my Remote(origin) in eclipse-git and when I try to add it back, I get the same error - java.net.SockettimeoutException: Read timed out.
However, via git bash, I can commit a file and push it to the local branch in GitHub.
I hope this info is enough to give me some idea.
FYI: I am working on a existing project, so when I push a file up for review, it worked successfully. It is just that I cannot now do it in eclipse.
Then try, as described here, to switch to an HTTPs URL.
You can then cache your GitHub credentials (GitHub username/password) in a credential helper, generally already configured (see git config credential.helper)
It is probably caused by the removal of weak cryptographic standards.
You need a recent Java 8 revision (i.e. 1.8.0_161), a recent version of EGit (such as 4.10.0.201712302008-r) and you probably need also to restart (just once) Eclipse with the -clean parameter.
Related
Getting this issue in spring tool suit while fetching/pull latest changes from remote branch. i don't have git bash on my local previously it was working fine right now i am getting below mention issue.
Couldn't lock local tracking ref for update
I also encountered same problem
But I removed this problem using GITHUB Desktop tool.
Once I executed pull from STS, its showed the dialog box with error as shown above. and a up arrow got appended showing there are some commit to be pushed,
though I had not made any commits before this pull. The changes from pull were not added to my local project.
I checked on Github Desktop, and it also showed same arrow.
I pushed it from tool, and it was resolved. The changes from pull got added to local project.
While you don't have git bash, Eclipse is using its own JGit (java-based implementation of Git)
As recommended in "egit lock fail eclipse", do check if you have any "<refname>.lock" file under .git/refs/". (howlger refers to eclipse issue 417860:
I checked in jgit and egit sources and found that the only occurrence of the text "[lock fail]" is used when fetch fails to update a remote tracking branch.
This can happen if a previous crash didn't cleanup a "<refname>.lock" file which git creates as a lock to guard the ref against concurrent updates.
git remote prune origin
solved same problem for me
Currently I'm facing an issue while installing Kura using Eclipse Installer.
Attached the screenshot and log for further reference.
I hope the issue is unable to pull from git repo.
Could somebody help me out and let me know in case of any further details required.
UPDATED as on 03-09-2017
Now the issue is different attached the screenshot for your reference and when I click back the git repo is not found .
I trying to setup more than a month but still couldn't it what is the other way to explore Kura.
From this eclipse bug, this is more likely related to a network issue.
It seems the session has been dropped in making a channel connection.
|And most important: How can we avoid this?
There must be many reasons for unexpected session drops caused by
external factors, so I suggest to re-try making sessions or channels
at such a case.
If that persists, try and use https url:
git config --global url."https://".insteadOf git#
The error message seen looks like JGit issue 455005:
java.io.IOException: Could not delete file C:\path\to\repo\.git\objects\pack\pack-5cb....pack
That's a common problem on Windows systems. As soon as you open a repository and do operations which access the packfiles (nearly all git operations do that: staging view, history ...) JGit caches data from the packfiles and keeps handles to packfiles open. But as long as handles are open you cannot delete the file under windows.
On Unix systems you don't have this problem because you can unlink files on which you have open file handles. The root cause for your problem is that we delete the repo only halfways. Aftwards we have a corrupted nearly empty gitdir and that reflog doesn't work on that is only the smallest of all problems.
check if the issue persists after a reboot (to make sure there is no other process preempts the file).
If not, try deleting fully (with Eclipse closed), and try again to clone it.
See also bug 336800:
You are creating a new Git object that has a repository associated with it.
This repository is automatically opened and thus has to be closed so that file resources are released.
I'm having an issue with setting up jenkins for build automation, we use the source control host codebasehq, with mercurial, however it is failing to pull from the repo.
The plugin seems to connect fine with the supplied credentials (at the moment we're simply using the in http url credentials) but then gives the following error:
Building in workspace /home/ubuntu/jenkins/jobs/testJob/workspace
$ hg clone --rev tip --noupdate https://foo:bar#initech.codebasehq.com/foo/bar.hg /home/ubuntu/jenkins/jobs/testJob/workspace
abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
I've tried running the command in the error message, but it simply returns the same abort message.
I have limited experience with mercurial, and google doesn't seem to return much on the error message, which makes me think it might either be an issue with the jenkins plugin, or codebasehq's mercurial setup.
Any information on the error or if anyone has experience with setting up this kind of thing on codebasehq successfully and could share any advice would be fantastic.
After a response from the codebasehq support team, it seems that 'changegroupsubset' refers to a feature that is unsupported by the https version of their mercurial repository. It is however, supported by the ssh version of their repository, so I was able to fix this by simply replacing
hg clone --rev tip --noupdate https://foo:bar#initech.codebasehq.com/foo/bar.hg /home/ubuntu/jenkins/jobs/testJob/workspace
with
hg clone --rev tip --noupdate ssh://foo:bar#initech.codebasehq.com/foo/bar.hg /home/ubuntu/jenkins/jobs/testJob/workspace
And this worked successfully.
I'm trying to clone a remote repository via SSH using EGit.
I've made some progress by setting http.sslverify to false and turning up the remote connection timeout.
Now the cloning makes progress, through "resolving deltas", but then hangs Eclipse with a full "loading" bar. There is no label on the bar and no apparent way to cancel the operation without force-quitting Eclipse.
I'm running Eclipse 3.7.0 and Mac OS 10.5.8.
Any ideas? I'm not sure what to do because I have no error message -- just no progress.
(BTW, I originally posted this as an "answer" in another thread. My post was deleted. I apologize for the breach of etiquette and can only say that I'm new here. I'm a bit perplexed that I didn't get any notification that my post had been deleted; I had to search again to find the thread and scroll down to see the message.)
Peter, just curious as to where you host your repository? If you had a timeout issue, it's possible the host has even more issues.
Have you tried running the git clone from the command line and use EGit only for the "mundane" tasks? It's not ideal, but being able to do it from the command line usually saves a lot of trouble, and if it fails the error messages are very clear about why.
I've used EGit a while, but went back to just opening a terminal and doing the sacro-sanct
git commit -a
git fetch origin/master (or whatever your branch is)
git merge
git push
EGit tends to fail for weird reasons. And when using with Github it becomes a nightmare to set it up to use SSH keys.
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://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:
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.
This seemed to work for me:
Do everything Firoz and Nishant say except push: https://stackoverflow.com/a/9889350
Create or edit the following file on your desktop:
File : ~/.ssh/config
Content :
Host github.com
User [your_github_username]
Hostname github.com
PreferredAuthentications publickey
IdentityFile [path_to_private_key]
In your Eclipse Git Setup for your project do the following:
URI : git#github.com:[repo_owner_username]/[repo_name].git
Protocol : ssh
Username : git
Password : [leave_blank]
Save and push.
See this GitHub SSH Help page for useful info: http://help.github.com/ssh-issues/
Worked for me after initially suffering through "session is down" and "cannot open git-upload-pack" errors. Hope it helps everyone else too.
Good luck!
I faced the same problem and I found out solution which is extremely foolish.
I took following steps:
I logged into git repository of my project from browser and didn't sign out.
I copied the http url to push or pull from project repository from github.
I pasted the url in my eclipse plugin while pushing code (didn't use the already stored one even though both of them were same)
I don't know what and why but above steps have worked for me whenever I have faced above problem. I don't know why does eclipse throw such exceptions and why does it gets solved this way.
You can also try pushing using other ways outside of eclipse. for eg. `TortoiseGit` or `SmartGit` etc.
I had the same problem. I fixed it by pointing the JAVA_HOME variable to jdk 6. It was originally pointing to jdk 5.
I got this error message and it was fixed when one of my co-workers emailed me the two files id_rsa and id_rsa (MS Pub doc), I put them in C:Users\[userID]\.ssh, and shut down and restarted my IDE.
I had this issue with EGit and solved it at last. Somehow sometimes things get messed up. If you can not solve it through Eclipse just go to your "git" folder with git bash with Windows. With Linux it is even easier: just open the terminal.
This problem occurs because of username, password, and ssh keys getting messed up.
So, use the commands "git remote show origin" and make sure if the origin is username#github.com...... Sometimes Eclipse just puts "git" as a username so make sure you have the correct user name by changing it with the command git remote set-url origin https://usrname#github.com/restofthe url. It should automatically change the configurations in eclipse.
Best...
I also had this issue.
The following command in Git Bash, comes handy in such scenarios: git remote prune origin
This configured the Pull/Push in the corrupted branch.