Download Gitblit from http://gitblit.com/
Upload the zip file to the relevant machine.
Unzip and open the configuration guide
server.httpsPortports to any suitable available ports and make sure that they are open to outside access.
server.httpPort = 8280and
server.httpsPort= 8443 .
server.httpsBindInterfaceshould be empty.
Navigate to the parent directory and run the following command:
Now you can access the gitblit server from
<machine ip>:<http port>. For a complete setup guide go to http://gitblit.com/setup.html
- Create a repository.
Add a user to the repository.
Click on the repository name to obtain the URL of the repository.
Git repo url: http://18.104.22.168:8080/git/s2-beta-test.git .
22.214.171.124 is the IP of the instance.
8080 is the http port
Currently only http external Git repository URLs are supported and the URL should not contain the username.
- Initialize the repository by cloning it into your local machine, add an initial commit and push it to the repository.
See the README.txt file for an example. If the repository is not cloned, the
pullcommands will fail.
Adding a post commit hook
A post commit hook should be added to the Git repository to notify commit events to Stratos Controller. Gitblit supports groovy scripts for execution after an artifact is pushed to the repository.
This folder should contain groovy script with the
Add the script name to
This will add scripts common to all repositories.
If you wish to add a repository specific scripts:
For more details go to http://gitblit.com/setup.html and see the Groovy Hook Scripts section .
Remove the entry from
On the E dit Repository menu, click Hook Scripts.
S elect the relevant script.
The script should contain a curl call with the repository URL to the repository notification service in Stratos Controller.
Allows insecure SSL connections and transfers.
Specifies a custom request method which in this case is POST -d The data to be sent with the request.
JSON format string which includes the repository URL.
The following is the POST end point reference for the repository notification service