Download the latest version of the Git connector here.
This is the README for the Krugle reference implementation of Git Source Control Management Interface
(SCMI).
System requirements:
* Windows, *nix or OS X
* Java 1.5 or higher
* 100 MB free RAM, for most regular sized repositories. The SCMI might utilize as much as 512
MB for large repositories. If an 'out of memory' exception is thrown, please set the maximum java memory
argument (-Xmx) via scmi-env.bat (windows) and run.sh (*nix).
* Sufficient disk space for git working copies which SCMI will crawl. Additional space will be required
depending on the size of the largest project to be indexed. If several large (multiple-gigabyte) projects
is scheduled to be crawled in parallel, the amount of working space required will increase.
* "stateDir" refers to temporary directory containing projects crawled from SCM, which can be configured in
property file.
WINDOWS INSTALLATION
1. Pre-requisites:
* A new user for this SCMI application is recommended (not a requirement). e.g: "gitscmi"
* Make sure you have java 1.5 or higher.
2. Uncompress the archive of the git SCMI distribution. The path "C:\SCMI\git-scmi\"
is recommended.
3. Modify <install location>\scmi.properties
* The file was originally created on *nix OS, therefore an editor supports Unix line feed is required.
(Ultra-Edit is recommended).
* Please make sure using "\\" instead of "\" character in case of Java string
escaping.
* By default, all state files (including checked out working copies) will be stored in the
stateDir sub-directory of the SCMI install path. The path can be customized by setting:
scmi.stateDir=C:\\path\\to\\custom\\stateDir
Change this if disk space runs low, or the stateDir refers to a path which exceeds character limit.
Note: Must be an absolute path.
4. Modify <install location>\run.bat
* Test java command by running "java -version" in command line mode. If the command is not found,
please set system environment variable "JAVA_HOME" and "JRE_HOME" to a proper path.
* Set SCMI_HOME to the <installed location> where you uncompressed SCMI scripts. e.g: "C:\\SCMI\\git-scmi\\"
5. Execute run.bat.
6. Validate that the SCMI is running correctly by navigating to:
http://<hostname of SCMI>:<port of SCMI>/status
* The port usually is 8765 (unless modified in scmi.properties).
If the status page of SCMI did not appear, the SCMI didn't start up properly. Please check the activity log
which locates in <install location>\logs\scmi-activity.log
7. Continue to USAGE GUIDE below.
*NIX INSTALLATION
1. Pre-requisites:
* A new user for this SCMI application is recommended (not a requirement). e.g: "gitscmi"
* Make sure you have java 1.5 or higher.
2. Uncompress the archive of the git SCMI distribution. The path "/home/<user>/git-scmi"
is recommended
3. Modify <install location>\scmi.properties
* By default, all state files (including checked out working copies) will be stored in the
stateDir sub-directory of the SCMI install path. This can be customized by setting:
scmi.stateDir=/path/to/custom/stateDir
Change this if disk space runs low, or the stateDir refers to a path which exceeds character limit.
Note: Must be an absolute path.
4. Modify <install location>/init.d/gitscmi.sh
* You can execute bin/run.sh from the scmi folder to start installation right away. However, the process has
to be terminated manually. We recommend you to follow the steps below to properly install the SCMI application.
* Uncomment and set the USER variable which locates to the beginning of /init.d/gitscmi.sh.
E.g: USER=gitscmi.
* Set the SCMIDIR variable to the install location. E.g: /home/gitscmi/git-scmi
* Make sure MYNAME is unique for every scmi installation. The variable is utilized by gitscmi.sh to store the
pid of running process.
5. File permissions: change the owner for the entire installation directory
chown -R gitscmi /home/gitscmi/git-scmi
6. Create a symbol link from /etc/init.d/gitscmi to <install location>/init.d/gitscmi.sh
cd /etc/init.d
ln -s /home/gitcmi/git-scmi/init.d/gitscmi.sh gitscmi
* Set this script run level. The command depends on your distribution of *nix OS.
If the operating system supports chkconfig (try 'which chkconfig'):
chkconfig --levels 35 gitscmi on
If your installation runs under Ubuntu Linux:
update-rc.d gitscmi defaults
If both commands are not available, please refer to OS manual for application run level settings.
7. Start the git SCMI:
service gitscmi start
If service did not start successfully:
a) Switch to root (make sure you run 'su -' so that environment variables are loaded correctly)
and restart the service.
b) Directly execute 'run.sh' using SCMI user, note that the process will have to be killed manually.
c) Check the log file located at <install location>/logs/git-activity.log for further infomation.
8. Validate that the SCMI is running correctly by navigating to:
http://<hostname of SCMI>:<port of SCMI>/status
* The port usually is 8765 (unless modified in scmi.properties).
If the status page of SCMI did not appear, the SCMI didn't start up properly. Please check the activity log
which locates in <install location>\logs\scmi-activity.log
USAGE
1. Once the SCMI has been successfully start up, navigate to Krugle Enterprise Search
Appliance (KE) admin page. E.g: http://<hostname>:8080/projects/project_listing.html
2. Create a new SCM repository of the SCMI type.
* Set hostname according to hostname or IP address of the machine hosting this SCMI.
* The scm name can be anything. E.g: "gitscmi".
* Leave the username and password blank.
* Set port to 8765 (unless modified in scmi.properties)
* Set protocol to HTTP.
* Set path to /repository
3. Create new project.
* Add a SCM location for the SCM repository which has been created in step 2.
* The location field should be a valid git url. E.g:
· ssh://[user@]host.xz[:port]/path/to/repo.git/
· git://host.xz[:port]/path/to/repo.git/
· http[s]://host.xz[:port]/path/to/repo.git/
* The parameters field takes URL encoded parameters. Currently supports 'username', 'password', 'auth-file' and 'branch'. E.g:
username=bob&password=secretpassword1&auth-file=ssh-key&branch=branch1
NOTE:
a) A blank password will be used if omitting password parameter.
b) The values for 'username' and 'password' must be URL encoded, so any characters which are not 0-9 a-z A-Z ._-* must be encoded.
See: http://www.w3schools.com/TAGS/ref_urlencode.asp
c) When using ssh for cloning git repository, a valid private key is required. The default location of private key is /home/$USER/.ssh/id_rsa,
if the private key were placed elsewhere, the user should provide auth-file parameter explicitly.
d) Parameter 'auth-file' refers to ssh private key file needed for clone/fetch/checkout,etc. The path is a RELATIVE PATH to $SCMI_HOME.
e) Parameter 'branch' refers to a specified git branch the user wanted to index.
* Once the project is being crawled, the activities will be logged to <install location>/logs/scmi-activity.log
for further usage.
For more information on setting up Krugle Enterprise with SCMI clients, please refer to
Krugle Enterprise Administration Guide and the SCMI SDK documentation.
LOGGING
Log settings can be customized by editing the log4j.properties file.
You can customize the logging level, appender properties, logging format and output pipe. Note that this
change must be made before the SCMI client is started.