Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding remote git repository with git:// protocol

Mario Fraiss November 25, 2012

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 votes
Answer accepted
lpater
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 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.

Mario Fraiss November 25, 2012

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.

Mario Fraiss November 25, 2012

Hey,

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

Thanks

lpater
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 25, 2012

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

Thanks

0 votes
lpater
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 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.

0 votes
lpater
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 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.

Mario Fraiss November 25, 2012

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events