Question

I'd cloned some respositories from github to my local machine (linux x86 32 bit kubuntu 12.04). In general, I do clone from command line and then connect to eclipse using git perspective and "add existing local git repository to this view". After that, I'm able to import projects (from working directory), performing commit and something else.

But when I try to fetch or push against the remote repository, I got some different error messages.

When trying to fetch, I got the error message: Invalid remote: origin

And when I try to push, I got something like: https://github.com/Joe-Merten/Playground: https://github.com/Joe-Merten/Playground/info/refs?service=git-receive-pack not found

Fetch and push via egit definitively has worked until about 10 days ago.

Fetch and push from linux command line is still working without problems.

When trying to clone using eclipse egit, I also got an error like: https://github.com/…/refs?service=git-receive-pack not found

I tried that out with eclipse 4.2 SR2 (Juno) and 4.3 SR2 (Kepler) and 4.4-M6 (Luna Prerelease) on some different linux machines.

Any suggestions?

Was it helpful?

Solution 2

Ok, it seems that I'd ran into the .git suffix issue.

Solution: I have to add .git to the URI.

Like Lars Vogel wrote in this nice article here: Copy the URL from Github and …, I'd just used that URI without adding the .git suffix.

So, I'd performed clone like:

$ git clone https://github.com/Joe-Merten/Playground

and that configures my clone to have the following remotes:

$ git --git-dir=Playground/.git remote -v
origin  https://github.com/Joe-Merten/Playground (fetch)
origin  https://github.com/Joe-Merten/Playground (push)

This way causes the described error messages.

But when I add that .git suffix to the URI:

$ git clone https://github.com/Joe-Merten/Playground.git

my remotes will also have .git suffix

$ git --git-dir=Playground/.git remote -v
origin  https://github.com/Joe-Merten/Playground.git (fetch)
origin  https://github.com/Joe-Merten/Playground.git (push)

Using this way, egit works as expected.

Looks like that (with or without .git suffix) don't matters as long as I using git from command line. But when using egit as frontend, this is obviously important.

(Hmm, wondering why that was not a problem until about middle of March 2014.)

OTHER TIPS

This could be a credential issue, as mentioned in "An internal Exception occurred during push: cannot store objects":

I just reconfigured the eclipse and added my github account information and store it.
Then it worked.

Team->Remote->Configure push to upstream->URI, Change->Add authentication details

The other classic issue is a capitalization problem in the url ("git-upload-pack not found"), but if it is working from the command line, this shouldn't be the case here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top