Adding remote git repository with git:// protocol

Hy community,

We have installed FishEye successfully and now we tried to add a remote git repository. This repository is on our own server (Ubuntu LTS with gitolite as server environment).

We tried to add the git repository, by the following repository url:
1) git://git.company.com:repositoryname

and selected "Generate key pair for ssh" as authentication-method. Further we added the public key to our git-server for allowing login as read-user. If we clone our git-repository at a development machine we use this repository location (TortoiseGit e.g.):

2) git@git.company.com:repositoryname

Our Problem:

FishEye says, that if we use the repository-url mentioned above (1):

The 'git' protocol does not allow authentication

Our company policies says, that git-repositories have not to be exposed by using http:// or https://.

How can we achieve this? Thanks for your assistance and greetings from Austria, Europe.

3 answers

1 accepted

0 vote
Lukasz Pater Atlassian Team Nov 25, 2012

What FishEye does behind the scenes is run git clone with the provided url.

To indicate that's it's an ssh url it needs to either be:

git@git.company.com:repositoryname

(note the colon before the repositoryname (instead of dash))

alternatively:

ssh://git@git.company.com/repositoryname

should also work. In both of these the 'git' before the @ is actually the username.

Please see https://confluence.atlassian.com/display/FISHEYE/Git for more details.

Hi,

To clarify: We created a user "fisheye" on our git-server, it's key is stored in fisheye@servername.pub. We granted read-rights to this user to the repository "testproject" and used the connection string:

ssh://fisheye@our.server.com/testproject

and it fails with - i cannot imagine why.. :|

Error testing connection.
Error talking to repository:

Der Befehl ""null"" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at com.atlassian.fisheye.git.GitScmConfig.testConnection(GitScmConfig.java:158)
at com.cenqua.fisheye.RepositoryConfig.testConnection(RepositoryConfig.java:444)
at com.atlassian.fisheye.spi.admin.impl.DefaultRepositoryAdminService.testConnectionFor(DefaultRepositoryAdminService.java:538)
at sun.reflect.GeneratedMethodAccessor1962.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Connection failed.

Hey,

Your answer led me to the solution. We have solved our issue :)

Thanks

Lukasz Pater Atlassian Team Nov 25, 2012

Glad it helped. Could you please share your solution here, so others might find it as well?

Thanks

0 vote
Lukasz Pater Atlassian Team Nov 25, 2012

Hi Mario,

The git:// protocol doesn't in fact support authentication - it's a property of the protocol, not of FishEye (see for example http://git-scm.com/book/ch4-1.html)

What you're using in TortoiseGit seems in fact like using ssh. (gitolite seems to support either ssh or http) Try specifying

git@git.company.com:repositoryname

in the FishEye setup dialog. This will use ssh, using the ssh key you've generated, and should allow you to connect to your repository.

Hi Lukasz,

thank you for your answer. Additional information:

Our company policy forces that we need to specify our ssh-connection by using a username e.g. "johndoe".

We tried it with your string, and get the following error-message - any ideas whats going wrong?

Error testing connection.
Error talking to repository:

fatal: 'git@git.company.at/repositoryname' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at com.atlassian.fisheye.git.GitScmConfig.testConnection(GitScmConfig.java:158)
at com.cenqua.fisheye.RepositoryConfig.testConnection(RepositoryConfig.java:444)
at com.atlassian.fisheye.spi.admin.impl.DefaultRepositoryAdminService.testConnectionFor(DefaultRepositoryAdminService.java:538)
at sun.reflect.GeneratedMethodAccessor1962.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Connection failed.

0 vote
Lukasz Pater Atlassian Team Nov 25, 2012

Are you able to run git clone from the machine that runs FishEye as the fisheye user? If not it might be a gitolite configuration problem.

Also: check your username. From what I see cloning from gitolite you should always use the shared username for ssh ('git' usually) - and the actual 'git-side' username is determined based on the ssh key.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published 6 hours ago in Summit

Networking, learning, and lightsabers: Daniel Eads top reasons you can't miss Summit Europe 2018

As a Support Engineer at ITHAKA, @Daniel Eads spends his days administering Jira and Confluence to help his team work better together. He is also a Community Champion, an AUG leader, the list goes on...

79 views 2 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you