This is the documentation for FishEye 3.5. View the latest version of

Unknown macro: {spacejump}

or visit the latest FishEye documentation home page.

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

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. 
  • The repository becomes available to Crucible (when integrated), so you can perform in-depth code reviews for changes in the repository. 
  • When you add a Stash Git repository to FishEye, a push to the repository will by default automatically trigger FishEye to run an incremental indexNo further configuration is required – you don't have to configure polling for new commits anymore, or set up dedicated FishEye web hooks in your Stash instance.

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.

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