Adding git repo fails due to Permission denied error
Getting UI error message below when adding GIT repository:
Also following entry can be found in Fisheye logs:
Fisheye is using '/usr/bin/ssh' to authenticate with SSH authenticated repositories. Exception executing command "/usr/bin/git ls-remote -h ssh://firstname.lastname@example.org/opt/git/ops.git " Non-zero exit code: 128 com.atlassian.utils.process.ProcessException: Non-zero exit code: 128 Error executing command "/usr/bin/git ls-remote -h ssh://email@example.com/opt/git/ops.git ": Permission denied (publickey,gssapi-with-mic,password). fatal: The remote end hung up unexpectedly Error testing connection. Error talking to repository: Permission denied (publickey,gssapi-with-mic,password). fatal: The remote end hung up unexpectedly at com.atlassian.fisheye.git.GitScmConfig.testConnection(GitScmConfig.java:162) at com.cenqua.fisheye.RepositoryConfig.testConnection(RepositoryConfig.java:450) at com.atlassian.fisheye.spi.admin.impl.DefaultRepositoryAdminService.testConnectionFor(DefaultRepositoryAdminService.java:540) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) Connection failed.
This GIT executable is not defined in Fisheye UI and the ssh keys are not configured.
First step is to define the Git executable inside Fisheye by doing:
- Go to Fisheye Administration.
- Click on Server.
- Look for Git Executable then click on Edit details.
- Set the path to your Git executable and save.
Once Git executable is defined refer to this article to generate SSH keys and have Fisheye authenticating against the GIT Server.