Skip to end of metadata
Go to start of metadata

This page describes how to use FishEye's native repository access to connect to a Git repository. The process for doing this depends on where the Git repository is hosted – connecting to a Git repo that is hosted in Atlassian Stash is much easier.

FishEye interacts with Git repositories by executing the Git command in a separate process. Hence, the server running FishEye needs to have Git installed. FishEye indexes Git repositories by making a private, bare clone of your repository within FishEye's cache area. It uses this private clone for most Git operations.

Requirements

On this page:

Git repositories hosted in Stash

When Atlassian Stash is integrated with FishEye, you can easily add Git repositories to FishEye. The repository behaves just like a native repository in FishEye, so your team gets all the benefits of FishEye indexing, browsing and searching. Furthermore, the repository becomes available to Crucible (when integrated), so you can perform in-depth code reviews for changes in the repository. See Integrating FishEye with Stash.

You'll need to have an account in the Stash instance, as well as permission to view the repository that you want to add.

  1. Click the 'cog' menu in the FishEye header, and choose Administration (you'll need to be logged in as an administrator to see this link).
  2. Click Repositories (under 'Repository Settings').
  3. Click the Stash repositories tab, and authenticate with the Stash server if necessary.
  4. If multiple instances of Stash are connected to FishEye, use the Stash server list to choose the instance of Stash that hosts the repository you wish to add.
  5. Optionally, type a filter pattern to restrict the list of displayed repositories to those with a matching name, key or project.
  6. Click Add for each repository that you wish to add to FishEye.

When you add a Stash repository:

  • FishEye creates a read-only SSH key and adds that as an access key to the repository in Stash. If this operation fails, the key will be added as a user key to your profile in Stash. You can check if an access key was added by viewing the repository's settings in Stash. See Using SSH keys to secure Git operations in the Stash documentation for more information.
  • FishEye prefixes the Stash project key to the name of the newly added repository, to help you identify the origin of the repository.

Git repositories hosted elsewhere

When adding or managing a Git repository, you can do the following:


To add an external Git repository to FishEye:

  1. Click the 'cog' menu in the FishEye header, and choose Administration (you'll need to be logged in as an administrator to see this link).
  2. Click Repositories (under 'Repository Settings').
  3. Click Native repository access, and then Add repository.
  4. Complete the wizard:

Step 1

Field

Description

Repository Type

Select Git.

Name

Enter a name for this repository. The name may contain alphanumeric, underscore, '-' or '.' characters. This will be repository name in FishEye.

Description

Enter a short description of this repository.

Step 2

Field

Description

Repository Location

Enter the URL describing the Git repository location. FishEye will clone this repository for indexing purposes. You can use any URL recognised by Git itself. Fisheye recognizes the following URL's:

git://server_name[:port]/path_to_repository
http://server_name[:port]/path_to_repository
https://server_name[:port]/path_to_repository
ssh://server_name[:port]/path_to_repository
file://[hostname]/path_to_repository

Do not use spaces in your URL.

Path

(optional) Enter the path within the Git repository that you want FishEye to index. This lets you limit FishEye to indexing a subset of the complete Git repository.

Block Size

(optional) Enter how many commits you want FishEye to process in one batch. Larger values require more memory and increase the amount of work FishEye commits to the database in a single operation. The default is 400. The minimum being 1. This field only accepts positive whole numbers. Requires a repository restart.

Command Timeout

(optional) Enter the time that a single Git command is allowed to take to execute. Any command that exceeds this time is terminated and the operation will fail.

Rename Detection

(optional) Select which Git rename detection strategy FishEye will use to detect copy and move operations within the repository. Please refer to the Git documentation for more information.

Step 3

Field

Description

Store Diff Info

Tick this checkbox, if you want FishEye to cache information about file diffs in its database. This is required for some FishEye features. See Configuring Repository Details for more information on this setting.

Enable Repository After Adding

Tick this checkbox, to enable the repository after adding (i.e. when you click the 'Add' button).

 

Limitations

When FishEye indexes a Git repository, it indexes by the available branches. As it processes the commits on a branch, FishEye will assign the commit to the branch it first sees the commit on. Commits are only indexed once so if a commit belongs to multiple branches, the commit will not be indexed against subsequent branches.

Furthermore, indexing of a Git repository can be slow when new branches are pushed. Performance in such cases can be improved by setting a command line option for FishEye. See this KB page for more information.

  • No labels

6 Comments

  1. Anonymous

    Does fisheye also detect 

    git@server_name:path_to_repository.git

    like it is being displayed for repositories at github.com?

  2. now that TFS (2013) supports Git. I am wondering if it is possible to add tfs git repository (https) to fisheye

    for example, I created a project using git on tfs online: https://mytfs.visualstudio.com/DefaultCollection/mygit and git location is:

    https://mytfs.visualstudio.com/DefaultCollection/_git/mygit 

    After I enabled alternate credential in tfs with username/password, then set git executable path ("C:\Program Files (x86)\Git\bin\git.exe"). I am unable to connect to this repository from fisheye Can you give us an example how to do this? thank you!

  3. Isn't there any "start revision" like for SVN repos? We have migrated from cvs (long time ago) to svn to git (stash) but now our license limit is exceeded in the fisheye starter license (because there are now user names in CVS, SVN and Git fashion for the commits). Any idea how to overcome this problem?

    1. We have used a git .mailmap file to map all old authors to a dummy-user. After reindexing everything worked well (smile).

  4. Is there is any report generation Plugin for Fisheye ?

  5. I just spent couple of hours trying to connect to a Bitbucket git repository and found out that having '#' in the password causes authentication failure. Not sure if this is limoted to Bitbucket or git, but keep it in mind.