Background - GIT Protocols
Git has support in dumb and smart client protocols. Client without smart protocol support has become extinct, and the dumb protocol should be avoided for poor performance and security. When smart protocol cannot be used, then the Git daemon (either Git Server or Bitbucket) would gracefully degrade to the dumb protocol.
An Issue with Bitbucket Default Installation
By default, Bitbucket is installed with dumb protocol support disabled (post-receive hook doesn't create info/refs file).
By default, the windows Bitbucket will not include the libraries to support smart protocol. As a result, after a fresh windows installation of Git, Bitbucket and Checkmarx - defining a Bitbucket source would fail with an error such as:
fatal: http://******:******@localhost:7990/projects/DEMO/repos/rep1/info/refs not valid: is this a git repository?
This error suggests that the dumb protocol cannot be used. It implicitly means that the smart protocol has failed as well.
Bitbucket server should be told where to find the Git libraries to support smart protocol. This can be done in one of the following two methods:
Method 1 (preferred)
1. Create or update the Bitbucket properties file %BITBUCKET_HOME%\shared\bitbucket.properties
2. Enter a line showing where the git core lib path is. See an example for a typical Git installation below:
- Define the machine PATH to the GIT core lib