Always when I try to push to remote I get a NullPointerException.
Commit,pull and fetch works fine.
I tried almost everyrhing, clone a repository, create a new one and trying to push but nothing worked.
Btw the remote repo is empty if that makes a difference.
Maybe someone can help me.
Here is the trace:
!ENTRY org.eclipse.core.jobs 4 2 2012-06-12 17:07:02.437
!MESSAGE An internal error occurred during: "Push to hannes - origin".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jgit.lib.ObjectIdOwnerMap.get(ObjectIdOwnerMap.java:131)
at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:889)
at org.eclipse.jgit.storage.pack.PackWriter.findObjectsToPack(PackWriter.java:1557)
at org.eclipse.jgit.storage.pack.PackWriter.preparePack(PackWriter.java:707)
at org.eclipse.jgit.storage.pack.PackWriter.preparePack(PackWriter.java:670)
at org.eclipse.jgit.transport.WalkPushConnection.sendpack(WalkPushConnection.java:229)
at org.eclipse.jgit.transport.WalkPushConnection.push(WalkPushConnection.java:169)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:141)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:152)
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)
i solved the problem myself. I had to do a manual push from the shell via command git push origin master(so the repo wasnt empy anymore) and after that the push command worked.
You can do this in egit by using the "Push..." operation, under Team -> Remote (also available on the right-click menu of entries in the Git Repositories view). The "Push..." operation lets you specify what you're pushing, and where.
By contrast, the "Push to Upstream" operation (aka "Push Changes to Upstream" in the toolbar) uses the defaults, which in this case don't make sense.
But egit should really provide a more meaningful failure message here.