...">

Error "Invalid Remote: Origin" when importing into Eclipse (m2eclipse, eGit)

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

Invalid remote: origin: Invalid remote: origin 

According to this: http://youtrack.jetbrains.com/issue/IDEA-77239 .git entry at the end of the address should solve the problem, but in fact it is not.

I do not know how to solve it. Any ideas?

Edit: And I'm using Windows. This seems like an important piece of information to add.

+6
source share
4 answers

This error can occur if there is a problem with SSH authentication, for example, if there is an invalid public key on the remote git server or if the remote git server has changed its SSH host key.

Eclipse will use the .ssh directory specified in Settings -> General -> Network Connections -> SSH2 for its ssh configuration. Set it to "{your default user directory} .ssh \".

To fix this, you first need to determine which ssh client you use for Git. This is stored in the GIT_SSH environment variable. Right-click Computer (Windows 7), then select Properties β†’ Advanced System Settings β†’ Environment Variables.

If GIT_SSH contains the path to plink.exe, you are using the PuTTY stack.

  • To open your public key, open the PuTTYgen.exe file, and then upload your private key file (* .ppk). The specified public key must match the public key on the remote git server.
  • To get a new host key, open a new PuTTY.exe session, and then connect to git @ {git repo server}.
  • Click OK and say yes to save the new key.
  • Once you are prompted to log in, you can close the PuTTY window. New key saved.
  • Restart Eclipse.

If GIT_SSH contains the path to "ssh.exe" in the "Git for Windows" tree, you use git for Windows OpenSSH.

  • Install% HOME% in your default directory (as specified in Eclipse, see above).
  • Set% HOMEDRIVE% to the drive letter of your user directory by default.
  • Set% HOMEPATH% to the default user directory path to% HOMEDRIVE%
  • To get the public key, open the file% HOMEDRIVE %% HOMEPATH% /. ssh / id_rsa.pub (or id_dsa.pub) in a text editor. The specified public key must match the public key on the remote git server.
  • To get the new host key, run: cmd.exe
  • Run git bash
  • Ctrl-c
  • At the bash prompt, run / c / path / to / git / for / windows / bin / ssh.exe git @ {git remote host}.
  • Enter yes to accept the new key.
  • After you are prompted to enter, enter: ctrl-c
  • Close the cmd.exe window
  • Restart Eclipse.

Finally, if you still have problems with the external ssh client, delete the GIT_SSH environment variable and set the HOME environment variable to your default user directory on Windows. Without the GIT_SSH variable, EGit will use its internal ssh client (java). It will use the .ssh directory above as its SSH configuration directory.

Note. If you have git for Windows, you can use its tools to create an SSH key pair in the .ssh directory:

  • Set% HOME% to the default user directory (as specified in Eclipse).
  • Set% HOMEDRIVE% to the drive letter of your user directory by default.
  • Set% HOMEPATH% to the default user directory path to% HOMEDRIVE%
  • Run git bash
  • Ctrl -c
  • Run: ssh-keygen.exe -t rsa -b 2048
  • Save default file names
  • Select a passphrase or save it without it. If you save a passphrase, Eclipse will offer you it every time you press or pull from a remote git server.
  • Close git bash

You can also use the graphical interface in the SSH2 settings panel in Eclipse to manage hosts and keys.

+9
source

Using Eclipse / Indigo with the Maven Plugin:
-Check Maven projects from SCM
-Removing that the git SCM plugin is installed, select "git" from the SCM URL: pop-up-center, for example, https: //@github.com//.git
the presence of @ and ".git" is important
If you think that the project is closed, you will be asked to enter a password. This should be good enough to move forward.

+1
source

check your .git / config, this error may occur, this is your missing ".git" at the end of your source URL

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

it should be

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

0
source

Can your git server move?

enter image description here

0
source

Source: https://habr.com/ru/post/920693/


All Articles