Egit: Cloning a repository via SSH - eclipse

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.

Related

STS getting this while pull/fetch latest changes Couldn't lock local tracking ref for update

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

cannot get remote repository refs in eclipse

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.

IOT Kura Installation unable to fetch from git hub repo and Repo Not Found

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.

Github commit not working on desktop app

I am using the latest version of the github desktop app(3.0.4) on a windows 10 machine. Recently, I am not being able to make commits. When trying to commit, the app goes to "committing" mode(loading..) and then nothing happens. It does not work when I try to commit a single file also.
I wrote to the GitHub team and this is what they had to say.
It looks like you're running into an out of memory exception:
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
Unfortunately GitHub Desktop does have some edge cases that can cause an OoM -- mainly when working with a large amounts of commits or larger files. We're working on fixing performance to reduce these edges cases, but in the meantime I would try committing directly from the Git Shell:
Hit ~ to open up the repository in the Git Shell
Run 'git add -A' to stage the changes
Run 'git commit -m "your commit message here"' to commit the changes
I haven't faced the problem again after I updated the desktop app(3.0.9.0 now).
I am seeing something similar when I "push" the changes to the remote (GitHub) after I upgraded to Windows 10 it seems to hang. It is like the "GitHub Desktop" application never comes back to confirm the push, but if I close the application and then open it again I can see that the "push" did happen at the time when I pressed the Sync button.
When I use the GitBash it works fine and fast. If I had the GitHub Desktop application running while doing this push from GitBash and now do a Sync the changes show up fast in the GitHub Desktop application but it keeps "Syncing" forever.

Can I have git gui and git bash and eclipse git plugin looking at same repo simultaneously?

I am using Eclipse to work on Android java projects on a Windows 7 machine. I am using Git to version-track, back up, and share.
I have git gui, git bash, and the eclipse git plug-in. My question really comes down to:
Is it safe and/or will my tools (gui, bash, eclipse) work right if I have them all open and looking at the same git repo at the same time?
I ask this because I have had eclipse fail to do a checkin a few times, and one time in git gui when it was barfing I got brave/stupid and hit the "unlock git index" choice. Since I did that unlock, none of my git clients have complained. But the suggestion that there IS a lock and that I "manually" unlocked it has me afraid that I have opened the door to non-thread safe crashes in my git repos.
TIA
Yes, it is safe. The index lock is something that is normally only intended to be held while an operation is in progress (e.g. while a commit is being created or a merge is being handled).
If you have to manually unlock the index it probably means one of your Git clients crashed/errored while it was doing one of those operations and thus accidentally left it locked.