Could not connect to SSH agent via socket [message #1855333] |
Sun, 09 October 2022 03:23  |
Eclipse User |
|
|
|
I'm trying to use Eclipse (2022-09 version) Egit (6.3.0.202209071007-r) 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 specific rsa private key (not the default id_rsa) and it is registered with Github. I also created a .ssh/config file to specify the right identity.
Host github
Hostname github.com
IdentityFile ~/.ssh/chevalrouge-info
User git
When cloning the repo with the git command line, it works. I can import the repo in Eclipse but I can't push either from eclipse.
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.
Any idea?
|
|
|
|
|
|
Re: Could not connect to SSH agent via socket [message #1855344 is a reply to message #1855343] |
Sun, 09 October 2022 16:49   |
Eclipse User |
|
|
|
Hm. I cannot reproduce this problem in Linux Mint 21 Cinnamon 5.4.12 (x86_64), Eclipse 2022-09, EGit 6.3.0.202209071007-r.
In my virtual machine (stock install, then a stock Eclipse download) I get
thomas@minty:~$ ps -eaf | grep keyring
thomas 1452 1 0 22:13 ? 00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login
thomas 2325 1452 0 22:23 ? 00:00:00 /usr/bin/ssh-agent -D -a /run/user/1000/keyring/.ssh
thomas 2330 2164 0 22:23 pts/0 00:00:00 grep --color=auto keyring
thomas@minty:~$ echo $SSH_AUTH_SOCK
/run/user/1000/keyring/ssh
thomas@minty:~$ ls -al /run/user/1000/keyring
total 0
drwx------ 2 thomas thomas 120 Oct 9 22:23 .
drwx------ 11 thomas thomas 320 Oct 9 22:23 ..
srwxrwxr-x 1 thomas thomas 0 Oct 9 22:13 control
srwxrwxr-x 1 thomas thomas 0 Oct 9 22:13 pkcs11
srw------- 1 thomas thomas 0 Oct 9 22:23 .ssh
srwxrwxr-x 1 thomas thomas 0 Oct 9 22:13 ssh
thomas@minty:~$
and cloning with an SSH config like yours from Github via SSH just works fine (both with no key in the agent, using the identity file, or also with that key in the agent and the identity file moved away to ensure the agent is used).
So it's not a problem with EGit but with the setup on your machine.
I notice that my ssh-agent process is different; your command line looks different. And I notice that you don't have /run/user/1000/keyring/.ssh, so "No such file or directory" is probably even the correct error message, but apparently refers to that file... (EGit has no control over that message, it only gets back an error code but no information about which file was missing. EGit cannot improve this error message.)
It appears that the ssh-agent is started on demand by that gnome-keyring-daemon.
Since I cannot reproduce the problem, I can't help much further.
[Updated on: Sun, 09 October 2022 16:58] by Moderator
|
|
|
|
Re: Could not connect to SSH agent via socket [message #1855453 is a reply to message #1855345] |
Sat, 15 October 2022 02:28  |
Eclipse User |
|
|
|
Hi,
Thank you very much for taking the time to help. Sorry for not saying about the other posts I made. I didn't think it would help.
For the command line problem I had, I didn't use the GIT_SSH_COMMAND. I rather created a ssh config file to specify the right identity for github. I don't think it's the same problem as with eclipse.
I think also that it has to be something with the ssh agent installation on my machine.
But finally I tried to switch off the ssh agent in Eclipse as you said, and I got it worked.
Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.05451 seconds