Introduction

Welcome to Clearvision's CM Bridge : Integrating Subversion, Git and ClearCase.

The CM Bridge is a multi functional bridge, which lets users of Subversion and Git carry on using their repositories, while at the same time automatically sharing code with ClearCase teams who are using ClearCase tools. Changes made at either side are seamlessly transported across the bridge to the other side. This way teams can collaborate across version control systems allowing Enterprise centralization and control while allowing localized freedom for other parts of the team.

From version 2.0 onwards, the CM Bridge supports Subversion to Subversion Bridges. This new functionality provides the benefits of a Subversion multi site without the need to install separate applications.

This can be used as a permanent 2-way bridge, or to support a strategy of slowly migrating to another SCM System.

The CM Bridge (also known as CC2X) implements CC2SVN, SVN2SVN and CC2GIT functionality. The distribution package and executables are named using the cc2x prefix. Note that there is only one distribution for the CM Bridge that contains these products. Provided you have licences for both SVN and GIT products, you can use the same installation to create Git and Subversion bridges.

DISCLAIMER: Please read this guide carefully and plan your bridges well. Clearvision cannot be held liable for any corrupted data. Evaluations of the CM Bridge must not be performed on live systems.

Overview

The CM Bridge provides a bridging mechanism that allows you to create a transparent link between your repository on one side of the Bridge and your repository on the other side.

The currently supported configurations are:

Data checked in to either end of a bridge will automatically be transferred to the opposite end. The CM Bridge operates asynchronously, meaning that when changes are committed in Subversion or Git or checked in to ClearCase, they are transferred in the background to the associated SCM system. The CM Bridge checks each bridged repository location on a regular basis to scan for new changes, which are then transferred to the other end of the bridge automatically.

Linking between SCM systems is achieved through bridges. Internally, each bridge maintains two workspaces: e.g. a ClearCase workspace (i.e. a view) and a Subversion workspace. The bridge synchronizes between the two workspaces and deals with updating and commiting changes to and from these workspaces.

Note: The common focus between all bridges is the transferring of the main content that is held in files. This ensures that a consistent set of files is available at either end of the bridge. The exact nature of the data and meta-data transferred between each side of the bridge is specific to each bridge type and will be outlined below in the relevant sections.

/!\ High Level Overview graphic

License

Evaluation License

Evaluation licenses can be requested from the clearvision website: http://www.clearvision-cm.com

A link to the license request form for a product can be found on the product's download page. To request a license we need some information about the machine that you will be running the server on. To get this information, you can run the get_license_info program on the machine you want to use as the server (the get_license_info program can be found within the tools directory of the installation directory). This will retrieve and present system information from the machine.

Once the license request form has been completed and submitted, an email will be sent to the registered email address containing the license infomation. This information will need to be inserted into the server config file.

Note that this license will only work on a particular server machine, on a particular port, and will allow a maximum number of users. The license is time-limited so it is recommended that Evaluation licenses are not requested until needed.

Full License

Once a license has been purchased, you will receive an email containing a link to the online full license generator. A similar form will need to be filled in as for an evaluation license. Once the form has been completed and confirmed a full license will be emailed. Any evaluation license details in the config file will need to be replaced by the full license.

Licenses are tied to the hardware as well as the IP address of the machine used for the server. It is therefore necessary to ensure these details will not change as this will leave the license invalid.

License Request for Clearvision CM Bridge:
     Evaluation: yes/no
     IP Address: 192.168.64.1
           Port: 54329
    MAC Address: 00-50-56-C0-00-05
          Users: 50
        Company: You Company name here
  Email Address: yourco@yourco.com
    Expiry Date: 2010-03-31
        Product: CC2X
 Num of Bridges: 5
    Svn Bridges: yes/no
    Git Bridges: yes/no

The get_license_info executable is run from a command prompt, e.g. on Windows:

width=90%

Installation

To install the CM Bridge products, you will need to do the following on your CC2X Server machine:

Prerequisites

The following prerequisites need to be in place before you can start using the CM Bridge

CC2X Server User Account (on Linux)

User Id (and Group)

If you are running on Linux, we recommend setting up a separate user (eg cc2x) to run the CC2X Server and contain the workspace and config files, etc. This user can then be used to run the CM Bridge server process and you can control this user's access to ClearCase, Subversion and Git appropriately.

Note: Please make sure that you set the human-readable name of the user (ie the 5th field in /etc/passwd, see the chfn command) otherwise you may have problems with Git.

PATH considerations

On Linux, make sure that ClearCase, Subversion and Git client software is usable by the CC2X User Id.

CM Bridge Installation

Start by unpacking the zip file on the machine to be used as the CM Bridge server host. Note that files can be extracted in any location. However, recommended locations are C:\Program Files on Windows and /opt on Linux hosts. The following directory structure will be created:

Note: It is recommended to install and run the CM Bridge server and the Webadmin server under the same user id. If you do need to use different user id's, then please make sure file permissions are set appropriately on the workspace directory, in particular the webadmin subdirectory and the files it contains.

Configuration

/!\ Please take care when editing any configuration files. Text editors such as Vim, Wordpad or Emacs can be used for editing. However, avoid Notepad or MS Word as extra control characters may be introduced, causing the application to fail.

Copy the template config file /opt/Clearvision/cc2svn/server/cc2x_server.cfg to an appropriate place, eg on Linux you might use /home/cc2x/.cc2x.cfg, on Windows, c:\cc2x\cc2x.cfg

Edit it to configure the following parameters:

(Note: Avoid Notepad or MS Word as these may introduce unwanted characters, corrupting config files)

[General]
; Working area for the ClearCase Bridge
workspace=/opt/Clearvision/cc2x/workspace

; The location the product is installed into
install_location=/opt/Clearvision/cc2x

; The amount of delay between each bridge sync
update_delay=60

; Email server information to allow the CM Bridge to send email notifications on problems
smtp_host=mail.server.com
smtp_username=user
smtp_password=password
from_address=user@localhost
; Default recipient for email notifications. Can be overridden in webadmin interface
default_resolvers=user@localhost

[Options]
; This section outlines additional options

; The svn_ignore_file_props and svn_ignore_rev_props dictate which properties should not be transferred between Subversion
; repositories on a Subversion to Subversion Bridge
; svn:mergeinfo should not be removed from svn_ignore_file_props
svn_ignore_file_props=svn:mergeinfo,clearvision-cc2x
svn_ignore_rev_props=myprop,yourprop,hello:myprop

; The svn_cm_bridge_branch tells CM Bridge where to store the branches it creates
; for each bridge when performing a bridge transfer
svn_cm_bridge_branch=branches

[License]
company_name=Your Company Plc
licence_email=admin@yourcompany.com
expiry_date=2008-12-31
bridges=999
allow_svn_bridges=1
allow_git_bridges=1
license_key=PLEASE_ADD_YOUR_LICENCE_key_HERE
license_certificate=PLEASE_ADD_YOUR_LICENCE_certificate_HERE

[Server]
; Define this ClearCase Bridge server machine as per your license
server_ip=192.168.1.2

[WebAdmin]
; Port for webadmin server
webadmin_port=8181

The License and Server sections must match the licence received from Clearvision. Any changes to the License or Server section will invalidate your licence.

/!\ The workspace defined in the config file must point to a local file system and not a network drive. Also, on older Windows systems, if the workspace lives on a FAT file system, you will need share.exe running (for file locking to work correctly).

/!\ If you do not correctly specify the install_location, you may receive an error message when running the cc2x_webadmin application. The error message given will be similar to: TemplateDoesNotExistAt /

Subversion Branching on Update

CM Bridge V2.1 introduces new functionality to avoid multiple conflicts during updates and to further safeguard your Subversion repository during updates.

In order to do this, CM Bridge will create a branch and copy all the changes from the other side of the bridge into this branch.

After completing the bridge update for the side, CM Bridge will merge the branch into the main path (specified in the CM Bridge Webadmin Server).

This has a number of benefits:

  1. If any issue occurs during a bridge update, all the data transferred is left on the branch
    • The main line is unaffected, meaning you have time to correct any errors and re-run the update
    • This avoids 'partial' bridge updates being merged into your main line, which could cause mixed code versions
    • On the next bridge update, the bride will resume updating from the last checkpoint (essentially exactly where it started on the previous update)
  2. Merging is much more simple and complicated merge files are reduced

Branch Format

In order to perform these updates, CM Bridge will create a branching directory called .clearvision_cmbridge in the root of the repository.
Each Bridge update will then create a unique sub-directory in the branch directory, with the following format:

This format allows you to see what bride created the branch and at what date and time it was created.

Branch Location

/!\ The branch location applies to all Subversion repositories managed by CM Bridge, therefore it is important that this is set up correctly.

Although the default location of the update branch is the root of the repository, it can be altered.

Merge Log Messages

In order to allow you to see where a commit came from a merged branch, CM Bridge will write the relative path of the branch into the log file (at the end of the log messages)

Logging

The CM Bridge keeps log files for both the CM Bridge server and the Webadmin server. You can configure the location of the log files using the log_file and web_log_file options, and the level of detail using the log_level option. The level can be one of the following:

For example:

log_file=/var/log/cc2x/cc2x_server.log
web_log_file=/var/log/cc2x/cc2x_web.log
log_level=INFO

Planning Bridges

Before setting up bridges, please read through this guide carefully to allow you to make an informed decision about your bridge setup. You can save time (and effort) by planning your bridges well and creating a suitable setup.

If you later discover that a setup was not suitable for your needs, you may need to perform manual modifications in one or more of the repositories in order to rectify the situation. Time spent on planning bridges up-front can save you time in the long run.

Setting up a New Bridge

When you first set up a new bridge, it is strongly recommended that one of the repositories is used as the master for the initial synchronization. Being the master means that only one side contains data in the location specified for the bridge, and the other side points to an empty directory. CC2X automatically detects data to be moved accross the bridge

If you were to bridge between two repository locations that already contain data, you would effectively merge the two locations together, which can result in conflicts that you would need to resolve manually. If you do need to merge two such repositories together, it is recommended that you first perform this merge manually on one side and make the merged data the master for the initial transfer. This will reduce the risk of the operation not having the desired result, and it will make it easier to undo any undesired results.

When you define a bridge, please note that both of the ends of the bridge must exist, i.e. if you set up a bridge from http://host.domain.com/svn/myrepository/trunk/mycomponent (on the Subversion side) to M:\\my_view\myproject\mycomponent (on the ClearCase side), then Subversion must contain a directory called mycomponent at the specified location, and the ClearCase element mycomponent must also exist and be accessible via the specified path. In terms of masters for the initial transfer, if Subversion is the master for this bridge, then CM Bridge would expect to find data for mycomponent in the Subversion repository and an empty directory mycomponent in ClearCase. Any sub-directories will be coppied over the bridge as part of the initial transfer so do not need to be manually created.

Note: Once the initial transfer has been performed, neither of the two ends of the bridges retain any particular ownership (or master relationship). This means that you can then edit changes in either location and they will be transferred to the other end of the bridge automatically.

Subversion Hooks

Prior to CM bridge version 2.0, Subversion rev-prop hooks were required to be installed on Subversion repositories. From Version 2.0 onwards, this is no longer the case.

ClearCase to Subversion/Git Bridges

Functionality

The ClearCase to Subversion and ClearCase to Git bridges provide the following functionality:

Considerations

A ClearCase to Subversion/Git Bridge system has four key elements:

  1. ClearCase

  2. Subversion and/or Git
  3. CM Bridge Server
  4. CM Bridge Webadmin Server

You need to consider the following points before setting up the CM Bridge:

General

ClearCase

Bridges connect ClearCase and Subversion/Git through a Subversion/Git workspace and a ClearCase view. Whilst the ClearCase view must be created manually, the CM Bridge will automatically create internal Subversion/Git workspaces in the location specified by the workspace configuration option.

Note: ClearCase views need to have a suitable Config Spec. For Example, if you are bridging with the main line in ClearCase, the following config spec would be suitable:

element * CHECKEDOUT
element * /main/LATEST

/!\ Every ClearCase view used for a bridge must have element * CHECKEDOUT as the first rule to ensure correct operation.

/!\ Also, please use dedicated views for bridges, i.e. do not use another user's view for a bridge as otherwise the bridge could inadvertently transfer checked out data or view-private files.

ClearCase Attribute

The CM Bridge requires a special attribute type to exist for all ClearCase vobs being bridged. Please create the attribute type by changing your current working directory into the vob directory under a suitable view and run the following command:-

cleartool mkattype -vtype integer clearvision_cc2x

/!\ You will have to do this for ALL Vobs that are bridged, so please check that this has already been done before you add a new bridge!

ClearCase Conflicts

In order to reduce conflicts on the ClearCase side, and in order to highlight the origin of the data, you could set up a special subversion branch to import Subversion data into. In addition to reducing synchronization conflicts, using a branch will also give you flexibility on how to use the data in views. What branch to use for the CM Bridge is defined through the config spec of the view used for the bridge.

Subversion (for ClearCase to Subversion Bridges)

The CM Bridge does not automatically start ClearCase VOBs and views or Subversion servers. Subversion must be up and running, ClearCase VOBs must be mounted and ClearCase views started before the CM Bridge server is started.

The Subversion client software has been installed on the CC2X Server host

The Subversion server should be up and running and access has been configured for the CC2X user id

Git (for ClearCase to Git Bridges)

Git software must be installed on the CC2X Server host.

The central (bare) Git repository is up and running; it has a master branch in it and access has been configured for the CC2X user id.

Multiple Bridges for the Same Repository

There are situations where it is useful to install multiple bridges between the same two databases. For example, you may choose to only bridge certain development branches of the ClearCase database with Subversion. This can be achieved by installing bridges on all branches to be bridged, configuring the ClearCase config specs for the workspaces to choose versions from specific branches.

When installing multiple bridges, it is strongly recommended to avoid overlap between the targets of different bridges. Take the following example:-

Bridge Name

Bridge Type

ClearCase View Path

Subversion/Git URL

Svn Bridge 1

Subversion

/view/bridge1_view/project_vob/src

http://svn.company.com/svn/project/trunk/src

Svn Bridge 2

Subversion

/view/bridge1_view/project_vob/src

http://svn.company.com/svn/project/branches/branch1/src

In the example above, the src data tree from the Subversion trunk as well as branch1 from the branches area would both be bridged into the same view, i.e. the same branch in ClearCase. The result would be a mix of branch data and trunk data with no particular value.

What the user intended to do in the example is a valid use case. You can achieve the underlying goal of the example by creating two views with config specs for two different branches. For example you could bridge .../trunk/src into a view configured for the main line and then bridge .../branches/branch1/src into a view configured for a branch. This will keep main line (i.e. trunk) and branches in line between ClearCase and Subversion, i.e. data checked in to the ClearCase branch will be transferred into a Subversion branch, and the main line in ClearCase is transferred into the trunk in Subversion.

Bridge Name

Bridge Type

ClearCase View Path

Subversion/Git URL

Svn Bridge 1

Subversion

/view/bridge1_view/project_vob/src

http://svn.company.com/svn/proj/trunk/src

Svn Bridge 2

Subversion

/view/bridge2_view/project_vob/src

http://svn.company.com/svn/proj/branches/br1/src

The config spec for bridge2_view would be configured as follows in order for the view to operate on the branch:-

element * CHECKEDOUT
element * /main/branch1/LATEST
element * /main/LATEST -mkbranch branch1

Please bear in mind the following implications of creating a bridge that operates on a branch:-

On the Subversion side, you could use the CM Bridge to only transfer particular baselines of a product using a bridge from the tags directory, or you could point to the trunk or particular branches in order to transfer development data. A combination of branches, tags and the trunk may also be useful. However, since the CM Bridge does not translate between ClearCase and Subversion tagging concepts, you need to take care when setting up bridges for multiple tags.

Constraints and Limitations

The ClearCase to Subversion/Git Bridges have a number of constraints and limitations outlined below:

General

ClearCase

ClearCase Attribute

The CM Bridge requires a special attribute type to exist for all ClearCase vobs being bridged. Please create the attribute type by changing your current working directory into the vob directory under a suitable view and run the following command:-

cleartool mkattype -vtype integer clearvision_cc2x

/!\ You will have to do this for ALL Vobs that are bridged, so please check that this has already been done before you add a new bridge!

Subversion (for CC2SVN bridges)

Subversion to Subversion Bridges

Functionality

Subversion to Subversion Bridges provide the following functionality:

Considerations

A Subversion to Subversion Bridge system has three key elements:

  1. Subversion
  2. CM Bridge Server
  3. CM Bridge Webadmin Server

You need to consider the following points before setting up the Bridge:

Multiple Bridges for the Same Repository

As with ClearCase to Subversion/Git, Subversion to Subversion also supports setting up multiple bridges for the same repository.

The scenario in this case could be one Subversion repository in one location sharing multiple projects with two different repositories located in different locations, e.g.

Bridge Name

Bridge Type

Subversion URL

Subversion URL

LondonToParis

Subversion

http://svn.london.com/svn/branches/paris/proj1/src

http://svn.paris.com/svn/proj1/trunk/src

NewYorkToParis

Subversion

http://svn.NewYork.com/svn/branches/paris/proj2/src

http://svn.paris.com/svn/proj2/trunk/src

Subversion Properties

Subversion to Subversion Bridges transfer File/Folder and revision properties between the repositories. As it may not be relevant to transfer all properties between repositories, CM Bridge provides the ability to ignore certain properties on transfer.

These are controlled through the newly introduced [Options] section of the configuration file.

[Options]
; This section outlines which properties should not be transferred between Subversion
; repositories on a Subversion to Subversion Bridge
svn_ignore_file_props=svn:mergeinfo,doc:language,
svn_ignore_rev_props=myprop,yourprop,hello:world

You need to consider the following points before adding/removing property ignore values:

Special Properties

Special consideration should be given to the impact of adding and removing properties from the ignore lists. For example svn:merge-info contains data specific to the repository for which it exists, therefore it should always remain in the list of ignored properties.

Another property example shown in the extract from the config file above shows a property called doc:language. In this case, the property could relate to the documentation language for a particular product and would therefore not be relevant in a repository being bridged to another country.

/!\ svn:externals is not permitted in the bridge and is therefore not covered in this section

Constraints and Limitations

The Subversion to Subversion Bridge constraints and limitations are outlined below:

Bridge Webadmin Configuration

Bridges are configured in the web-based graphical user interface. This section outlines how to start and use the CM Bridge Webadmin site to set up your Bridges

CM Bridge Webadmin Server

The Webadmin server must be started before the CM Bridge server. This will create and configure important data structures required for the CM Bridge server.

Please note that for the Webadmin server to operate correctly, you currently need to change your current working directory to the location of the Webadmin server executable and start the server from there (this will be fixed in a future release). You will also need to point to the location of the config file using the -f option:

cd /opt/Clearvision/cc2x/admin
./cc2x_webadmin -f /home/cc2x/.cc2x.cfg

After starting the Webadmin server, use a web browser to browse to the location of the admin server, e.g.: http://my.server.com:8181.

Note: After you have added your bridges, you can safely stop the Webadmin server and leave the main server running (you only need the Webadmin Server running if you want to make changes).

You will then be presented with the following login page:-

Webadmin Login

The default user name and password for the CM Bridge Webadmin server are admin and admin. Once logged in, you can change your password using the Change Password link at the top right of the screen.

If you typed the correct user name and password, you are presented with the Bridge Configuration view. In order to add a new bridge, fill in the form at the bottom of the page. The following table has some additional information on the fields to be filled in:

Field Name

Comments

Name

Please specify a unique name for the bridge.

Resolver Emails

A comma-separated list of email addresses to be notified if any problems occur.

Type

Specify the type of the bridge, i.e. Subversion or Git.

Repository (!ClearCase/Svn)

Please enter the full absolute path/URL to the location within the ClearCase view/Subversion repository to be used for this bridge. Please note that the full path must exist on the file system.

Repository (Svn/Git)

Please enter the full URL to the location within the Subversion/Git repository. Please note that the full path must exist on the file system.

User Name

Only applies to Subversion at this point. Please specify the user name to be used to log in to the Subversion repository. This can be left blank if you do not require authentication to log in to Subversion.

Password

Only applies to Subversion at this point. Please enter you Subversion password, or leave blank if no user authentication required.

Please note that while both CC2SVN (and SVN2SVN from V2.0) and CC2GIT are configured through the same interface, they are separately licensed products. You will only see the configuration options for the types of bridges you are licensed to use. Depending on your licence, you may therefore only see part of the tables in the CM Bridge configuration view.

Webadmin Add New Bridge

In order to add new bridge, fill form at the bottom of the table and, when you are finished, press Apply. The newly configured bridge will then appear in the table as shown in the following screenshot.

Webadmin View Bridges

You can make certain changes to existing bridges. However, the only settings that you are currently allowed to change is the list of resolver email addresses and the Subversion user name and password. For Git, the only setting that can be changed is the resolver emails.

You update information for a bridge by ticking the box in the Change column of the table, changing the information directly in the table and clicking Apply at the bottom of the screen.

Webadmin Update Bridge

Note: Both CC2GIT and CC2SVN can use whole repositories or a subdirectory within one for a bridge. It is recommened that whole subversion repositories are NOT used as Subversion uses branches and tags locations in the repository for management of branches and tags. When transferring data to ClearCase, these areas are treated as ordinary repository data with no special meaning attached.

Should you need to delete a bridge, you can click on the icon to the right of the bridge. /!\ Please note that deleting a bridge will not only stop the bridge but also reset internal metadata. If you recreate a bridge for the same view and repository location at a later stage, the CM Bridge server will retransfer any data previously transferred. If you do need to delete and recreate a bridge, it is advised that you do not make any changes at either end of the bridge until the bridge has settled again (i.e. until the initial transfer has been completed).

CM Bridge Server

Before running the CM Bridge Server, you should have already configured your Bridges using the Webadmin server and website.

Start the main server as follows:-

/opt/Clearvision/cc2x/server/cc2x_server -f /home/cc2x/.cc2x.cfg

The CM Bridge server and Webadmin server must share the same config file to ensure that they are both configured to use the same workspace. It is via this workspace that the CM Bridge server and Webadmin server exchange information.

Dealing with Merge Conflicts and Other Error Notifications

You are strongly advised not to ignore any error messages emailed to the list of resolver email addresses. If you receive such an email, it is very likely that the issues is permanent until resolved, even if you do not get any error messages again.

The most common issues are related to merge conflicts, which can occur if the same file is changed in Subversion/Git and ClearCase at the same time, and when the bridge comes to transfer changes across, it realises the conflict and informs the user.

If you get an email about a merge conflict, you can resolve the issue by checking in a fix changeset at either end of the bridge. The fixed files will then be transferred in the usual fashion with the next regular update and the two ends of the bridge will be back in sync.

Please refer to the User Guide for more information.

Troubleshooting

If you experience any issues during the installation please report your issues via the Clearvision Support Centre, which can be found at http://www.clearvision-cm.com/support-home/support-center.html.

This troubleshooting guide provides information on dealing with the most common issues that you may encounter.

Workspace Clean-up

Under rare circumstances it may become necessary to clean up the Subversion/Git working copies inside the CM Bridge workspace. You can find the working copy for a bridge inside the workspace directory specified in the config file under svn (or git respectively), within which you should see a subdirectory with the name of the bridge. Please do not delete the subdirectory but only inspect the working copy itself using svn status or git status and fix any problems you may see.

Forcing a Resynchronisation

If a large number of errors have occurred, and if you have already fixed the cause of the errors in the repository, it may be necessary to force a complete resynchronisation of a bridge. At the moment, this can only be achieved by deleting the bridge and recreating it with the same settings.

Please note that during a resynchronisation all data will be sent across again from both ends of the bridge, and it is therefore advisable to leave the bridge to settle before resuming work on the areas bridged. This is to prevent user changes from being overwritten by the bridge update.

Database Access Fails

If you see issues with locking of the cc2x.db database file, then consider the following:-

Appendix A: CC2Git on Windows

This section describes how to set up a remote Git repository hosted on Windows.

Prerequisites

There are two flavours of Git released for Windows Msysgit and Cygwin Git.

Msysgit is a native Microsoft Windows port for the Git client, which does not come with host services to allow the sharing of public repositories.

In order to use ssh or the git protocol to share a public repository you can use Cygwin. Although it is larger and slower, it does come with an ssh server and the git-daemon.

Note that you can use cygwin on the server and run git-daemon or ssh and still use msysgit on the clients.

Steps

This example will use the ssh protocol.

Server or remote repository

Setup

Create Repo

When pushing to a remote git repository, it is easier if you push to a bare repository $ git --bare init . If you want to push to a non-bare repository, you need to do a $ git reset --hard HEAD and $ git checkout -f on the remote server to sync the heads up. The latter is only recommended if you need to interact directly with the files on the remote server. The issue seems to be designed to prevent changes made locally on the remote repository being lost when changes are pushed from elsewhere.

Client or local repository

Setup

If you recieve "warnging: remote HEAD refers to nonexistent ref, unable to checkout." the first time you clone a remote repository, this is likely to be becasue you are cloning a bare repository. Adding, commmiting and pushing a file should resolve any problems.

Appendix B: Setting up SSH Keys for automatic login to Git SSH repositories

In order for CC2GIT to work with ssh Git repositories it is necessary to set up ssh Keys so that the client machine can perform an automatic login to the repository. This is necessary because CC2GIT works as a server process and it will not respond to a login request from the ssh server when accessing the Git Repository.

Prerequisites

Linux

Ensure that both Git and ssh client tools are installed as per your distribution.

Windows

Ensure that either msysgit or Cygwin Git are installed (See Appendix A)

Setup

Linux

Windows

The msysgit and cygwin Git installations work differently when setting up the ssh keys. Please follow the relevant instructions based on your client install of Git

msysgit

Cygwin Git

Cygwin