Adding git repo fails due to Permission denied error

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

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://git@your-git-address.com/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://git@your-git-address.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.

Cause

This GIT executable is not defined in Fisheye UI and the ssh keys are not configured.

Resolution

First step is to define the Git executable inside Fisheye by doing:

  1. Go to Fisheye Administration.
  2. Click on Server.
  3. Look for Git Executable then click on Edit details.
  4. 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.

 

Last modified on Jul 31, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.