Hi,
I'm trying to establish secure connection between Crucible (standalone instance) and GitHub repository using ssh key. When repository was configured to use https connection all was working just fine, but when I switch git authentication to ssh key, test of the connectivity returns error:
Error testing connection. Error talking to repository: Permission denied (publickey). fatal: The remote end hung up unexpectedly at com.atlassian.fisheye.git.GitScmConfig.testConnection(GitScmConfig.java:148) at com.cenqua.fisheye.RepositoryConfig.testConnection(RepositoryConfig.java:441) at com.atlassian.fisheye.spi.admin.impl.DefaultRepositoryAdminService.testConnectionFor(DefaultRepositoryAdminService.java:682) at sun.reflect.GeneratedMethodAccessor8112.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Connection failed.
Steps that was made:
Repository location changed from 'https://username@github.com/company/test_repo.git'
to 'ssh://username@github.com/company/test_repo.git'.
As I mentioned earlier, test connection returns error. My question is this type authorizations is possible, and if it is, is there any description or guide how to do that? Where private key that was generated by Crucible are stored? Ho I can test manually connectivity?
Hi Marcin,
this should work as you'd expect.
Please verify the url for the repository is the correct one, exactly as visible on the github page.
Github ssh repository urls have the format of 'git@github.com:organization/repository.git' - note no 'ssh://' prefix nor username present in the url.
If the url is correct, you could also do a check using
ssh -T -i path-to-private-key git@github.com
The keyfile fisheye uses for a given repository is stored in FISHEYE_INST/data/auth/repositoryname. This command should result in something like:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
if the key is recoginzed, and:
Permission denied (publickey).
otherwise.
Hi @Lukasz Pater,
Firstly, I want to thank you for a help, your advice was 100% accurate.
To setup this connection I was using documentation from this link: https://confluence.atlassian.com/display/FISHEYE034/Authentication
In the paragraph called 'Generate key pair for SSH' there is example of the repository location: ssh://test@example.com/repo. This is little a bit confusing because I was thinking that ssh:// prefix is mandatory.
I have suggestion to add in to mentioned documentation some example of GitHub repository configuration with repository location in format that you wrote.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.