Community
Participate
Working Groups
Created attachment 288699 [details] Error for Tortoise Git SSH usage EGit fails on Windows to clone existing repository (fails to connect to repository) when SSH_GIT environment variable is defined and points to TortoiseGit or core Git installation implementation of SSH, despite (Git CMD and Git Bash and Git GuI and Windows CMD and Tortoise Git) working with the same SSH keys. With GIT_SSH=C:\Program Files\TortoiseGit\bin\TortoisePlink.exe, the following error occurs (see attachment +++): org.eclipse.jgit.api.errors.TransportException: git@gitlab.com:user/project.git: not found. at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:192) at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:131) at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:116) at org.eclipse.egit.ui.internal.clone.SourceBranchPage$9.run(SourceBranchPage.java:377) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: git@gitlab.com:user/project.git: not found. at org.eclipse.jgit.transport.BasePackConnection.noRepository(BasePackConnection.java:574) at org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefsImpl(BasePackConnection.java:213) at org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefs(BasePackConnection.java:179) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:318) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:153) at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:170) ... 4 more Caused by: java.io.EOFException: Short read of block. at org.eclipse.jgit.util.IO.readFully(IO.java:203) at org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:316) at org.eclipse.jgit.transport.PacketLineIn.readString(PacketLineIn.java:180) at org.eclipse.jgit.transport.BasePackConnection.readLine(BasePackConnection.java:190) at org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefsImpl(BasePackConnection.java:211) ... 8 more With GIT_SSH=C:\Program Files\Git\usr\bin\ssh.exe, the following error occurs: org.eclipse.jgit.api.errors.TransportException: git@gitlab.com:user/project.git: git@gitlab.com: Permission denied (publickey). at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:192) at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:131) at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:116) at org.eclipse.egit.ui.internal.clone.SourceBranchPage$9.run(SourceBranchPage.java:377) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: git@gitlab.com:user/project.git: git@gitlab.com: Permission denied (publickey). at org.eclipse.jgit.transport.TransportGitSsh.cleanNotFound(TransportGitSsh.java:201) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:325) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:153) at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:170) ... 4 more Removing the GIT_SSH environment variable altogether resolved the issue.
Typo within description "SSH_GIT environment variable" = "GIT_SSH environment variable"