'"Invalid remote: origin" error when importing to Eclipse (m2eclipse, eGit)

In Eclipse when I try to import a project from a repository (File > Import > Maven > Check out Maven Projects from SCM) I select 'git' (eGit installed), fill in the ssh://... address (all the keys and access permissions are set), finally type in the password for rsa and...

Invalid remote: origin: Invalid remote: origin

According to this: http://youtrack.jetbrains.com/issue/IDEA-77239 writing .git at the end of address should solve the problem but actually it does not.

I have totally no idea how to resolve it further. Any ideas?

Edit: And I use Windows. It seems like an important piece of information to add.



Solution 1:[1]

May be your git server has moved?

enter image description here

Solution 2:[2]

Using Eclipse / Indigo, with the Maven plugin:

  • Check out Maven Projects from SCM

  • assuming that the git SCM plugin is installed, select "git" from the SCM URL: popup

  • enter, e.g.:

    https://<username>@github.com/<username>/<projectname>.git
    

    having @ and ".git" is important

  • assuming that the project is private, you will be prompted for the password

This should be good enough to move forward.

Solution 3:[3]

check out your .git/config this error can occur is your missing ".git" at the end of your origin url

[remote "origin"] url = https://some.domain.com/repo/name

should be

[remote "origin"] url = https://some.domain.com/repo/name.git

Solution 4:[4]

This Error may occur due to following reasons -

  1. Check the repository url, there should be a '.git' appended in the end.
  2. In case your network configurations have changed, make sure you have correct proxy configuration, and in case of secured git repository, make sure you provide correct credentials. (I got this error when my credentials were changed, and also when i had incorrect proxy configured.)

PS - To check network settings, go to Windows -> Preferences -> General -> Network Connections. Also if you're unsure of network settings or proxy config, you can try switching between Direct and Manual network settings.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Venkatesh Laguduva
Solution 2 Gray
Solution 3 Reece Markowsky
Solution 4 shashi009