An internal Exception occurred during push: cannot store objects - eclipse

Hello I am new to Git and trying to setup server part and client part.
On a Server side I have ssh access and Git version 1.5
On a Client side I have eclipse with eGit.
I created git repo on a server side via usual means: git init and added simple html file.
Using eGit I checkout the repo and everything seems to be going well. I made changes on a client side, committed it and decided to push back to the server.
Now I have all permissions set but still get following error:
I don't know how to fix it and error message doesn't provide much details.
Please help.
Thank you!

For me, on Windows eclipse, I had an error like this:
An internal Exception occurred during push: github.com/***/***/service=git-receive-pack not found
I just reconfigured the eclipse and added my github account information and store it. Then it worked. Team->Remove->Configure push to upstream->URI, Change->Add authentication details

Ok, I resolved my issue following way:
1) I changed configuration for remote fetch and pull from sftp to ssh
2) Once I did step 1. I got different error:
When I tried to push changes from Terminal I got following:
git push origin
Password:
bash: git-receive-pack: command not found
fatal: The remote end hung up unexpectedly
3) Found answer to the above error: git-upload-pack: command not found, how to fix this correctly
4) On my old server path to the git is: "/usr/local/git/bin" So I added it to .bashrc file.
Once I done that, everything started to work:

The possible issues are:
1. The source code might not be committed in the first place. Please try committing and see.
2. There is some issue with github authentication. Please re authenticate the credentials and try using: Team->Remove->Configure push to upstream->URI, Change->Add authentication

Related

Github CLI - Unable to find remote helper for 'https'

Github CLI is throwing the following error when I try to make a PR from the command line.
fatal: Unable to find remote helper for 'https'
exit status 128
I've tried the steps on this question and git clone works fine for me. I'm also able to see the status of PRs by using gh pr status
Does anyone have any ideas why this might be happening?
This is all set. After installing the library, I just needed to reboot my machine.

Eclipse can not push to Github

I have installed EGit and create a repo and push it to github using the following steps:
Step1:
Step2:
Step3:
Step4:
Step5:
Step6:
I get the following error:
Can't connect to any repository: https://github.com/mleoking/JavaGnuplotHybrid.git (https://github.com/mleoking/JavaGnuplotHybrid.git: error occurred during unpacking on the remote end: index-pack abnormal exit)
I have also tried to use ssh but it even does not allow me to pass step3. With http I can pass step3.
Thanks for help.
Found the problems by myself:
I simply deleted the git repository for my project and then create a fresh new git repository following this guide: http://wiki.eclipse.org/EGit/User_Guide/Getting_Started
And then still use the same steps, using https rather than ssl. I successfully committed it to github: https://github.com/mleoking/JavaGnuplotHybrid
I do not really know where was the problem. But eventually the above steps work.
Please use the ssh address of your repository. http is read-only.
git#github.com:mleoking/JavaGnuplotHybrid.git
On custom linux repos it could be a permissions error:
cd <path_to_git_folder.git>
chmod -R 777 *

github - attempting to push/pull/update (not sure of the terminology) updated code from github to remote server via terminal/ssh mac os

So I have my local computer - where I've updated my (html/js/css) code, github (where I've pushed the updated code already by doing a git add + git commit + git push origin master) and then the server of the actual website which the code is for.
I've connected to the server via the command line terminal. I've already previously cloned the code to the server (by running the command git clone [REPO URL]) while logged in to the server via SSH, so the (un-updated-)files are there.
But now that I've updated the code, and pushed that update to github, how do I now update or push the repo/code/updated-github-code to the server???
I'm currently looking at the terminal with
[~]#
^ showing. I tried to git clone [REPO URL] again, but then I get the msg:
fatal: destination path 'name of my file' already exists and is not an empty directory
Am I missing or overlooking a step? Well obviously I am but I could use some help please. Like I said I'm trying to update the code to the server so the actual website will reflect the changes I made to the code and so everything is in sync (local code, code pushed to github and hopefully/eventually the code on the server/website).
I am just learning this obviously, so go easy on me (I've spent almost the entire day learning to connect to the server via SSH in terminal)...
Also, feel free to correct my terminology...
Pull from github while ssh'd into the server using the link from the github repo "copy to clipboard" button on the web interface. If that doesn't work you could try wiping the repos folder on the server and cloning from scratch. But use that option with caution if downtime is unacceptable for this particular web app.

bzr push bzr+ssh gives me an error on webfaction

I setup bzr repo on both server and local. I am trying to push the code from my local directory to server, I am using the following command:
bzr push bzr+ssh://<username>#<username>.webfactional.com/myrepo
it asks for password and then gives me the error that bzr comman not found.
does anybody know what do i miss here? I think something is wrong from the server side, do you know how i should setup the servers side correctly?
Thanks
Adding the
export PATH=/home/< webname>/bin:$PATH
to .bashrc solved the issue :)

How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://git#github.com/xxx/xxx.git: session is down

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.