The main reasons that I know for a failure to push include the following:
a) A conflict would occur on one or more files in the remote repository if the push took place. This is why you need to pull from the remote repository so that all conflicts can be resolved locally.
b) There is any uncommitted work in the local workspace. Git dos not want anything in an inconsistent state to be pushed,
Basically your local repository and environment needs to be squeaky clean before Git will allow a push.
Incidentally, I have found enough problems with the Egit user interface that I now use SmartGit instead. SmartGit uses Jgit as it's engine but provides a much easier user interface, including a reasonable conflict resolver. I only use the Egit implementation for Âthings like moving and deleting files in Eclipse that have been versioned.
Have you set the user.email field to the email address you have on
file with the EF?
Well, I am setting the email field in eGit UI explicitly to
slewis@xxxxxxxxxxxxx.Â If I do *not* do this, I get an
authentication error (the rejection message is clear on that).Â
I wonder if you might get a better error message if you try the
push using the command line tools...
That's my next step...but I was trying to avoid the time spend
setting up yet another client, and attendant hassles (ssh on
windows, client environment, etc).
But thanks.Â If it's doable, I would suggest some sort of
server-side log of rejected pushes...with as much details as
possible about cause...as this would allow me/others to diagnose
such problems much more quickly/easily.
On 16/10/2010 9:48 PM, Scott Lewis wrote:
Thanks for the response.Â I believe I did do this on several
occasions...no conflicting files ever occurred.Â That's why I
was so surprised that I couldn't push my commits (i.e. they were
simply rejected).ÂÂ Unfortunately, I think this is some problem
with either eGit, git, or the combination here...and if I'm
getting this problem I would guess others will as well,
But I will try the workflow you describe again...and hope that I
just did something out of order.
On 10/16/2010 6:20 PM, Jonathan Gossage wrote:
I have been lurking here but I do
know the answer to this one. You should do a fetch/merge
from the remote repo AFTER you do your local commits and
before pushing. If you get any conflicting files during this
process, you must resolve the conflicts and commit the
corrected files to your local repo before trying to push to
the remote repo. Follow this workflow always until you have
built up enough experience to know when you can safely vary
it. You will save yourself a lot of trouble this way.
I've been using the eGit client (0.10.0) over the last
couple of days with the new ECF git repo, and have some
questions (for Markus and/or others). Â I've been having
the difficulties as described below, and I wanted to
check with others to see if perhaps I'm doing something
in the expected workflow incorrectly.
Here's what I've been doing
1) Clone git repo at git.eclipse.org
2) Making change locally
3) commit those changes to my local repo (master branch)
4) pushing the changes to git.eclipse.org
ECF repo (master to master)
When I do the above with a freshly cloned
repo...everything works fine. ÂBut if another committer
(e.g. Markus) makes changes locally and then pushes his
changes to git.eclipse.org,
I get a rejection message when I go to push (4). ÂNow if
I insert a Fetch... in between either 1 and 2 or 2 and 3
I would expect 4 to then work, but it doesn't...I just
get a rejection message on the push and no details of
what is causing the rejection (it's not authentication
or anything like that...the message just says 'rejected'
with a red X, with no further details at all.
When this happened to me yesterday I thought it might
have been that I was on a VPN (as well as my normal
network)...when I did the Fetch...but that turns out not
to be it...because it happened again this morning (not
on a VPN)...i.e. after Markus had committed and pushed
some more changes.
Anyone have an idea of what might be going on here?
ÂShould I be doing something else/some other sequence to
get others' updates and be able to push my own updates?