Reputation: 145
I'm trying to use Eclipse (2022-09 version) egit to clone a Github repo using ssh under Linux Mint. When I do, I get an eclipse error message :
DefaultAuthFuture[ssh-connection]: Failed (IOException) to execute: Could not connect to SSH agent via socket '/run/user/1000/keyring/ssh'
I'm using a rsa private key (but not the default id_rsa) which is registered with Github. I also created a .ssh/config file to specify the right identity.
When cloning the repo with the git command line, it works. In the Eclipse preferences, in SSH2 menu, I have set the identify in private keys field. I also see that I don't have any ssh_agent in the SSH Agent tab. But I can't add anything.
I know that there have always been some problems with egit ssh on Linux. But I can't find my error anywhere.
Thanks for your help.
Upvotes: 3
Views: 2786
Reputation: 1
The solutions in this
As a quick fix, add "IdentityAgent none" in your ~/.ssh/config host entry. is the solution worked for me
Upvotes: 0
Reputation: 145
I didn't find the explanation of the problem that seems to be caused by the ssh-agent installation on my machine. But disabling the ssh-agent in Eclipse works (Preferences > Git > unselect "Use SSH Agent for SSH connections"
Upvotes: 6
Reputation: 34
hope next advice will be helpful, it's based on a similar problem what i had on my Ubuntu, so there will be no problem for you to adjust commands for Linux Mint.
run next command:
chmod 600 id_rsa
cd to your project directory
Run command to clone your repository:
git clone put-your-ssh-git-repo-url
Then you will be prompted to accept that authentication of the host couldn't be verified & after accepting that it started getting the repository.
The repository cloned and created some necessarily files what you are missing to recognize the .ssh key.
hope after above you can start to use git from eclipse
P.S check for new files in /.ssh/ , should be a new known_hosts file
Upvotes: 0