Private Git repository on AWS S3 Bucket

LinkedIn Tweet Facebook
Private Git repository on AWS S3 Bucket


S3 Bucket

Create a S3 bucket as per domain name.

IAM credentials for S3 Access

Create Users in AWS IAM and give them S3 Full Access. Download the credentials for the user in csv.

Credentials jgit

Download JGit

Now download from eclipse site. After download change its name to

Download JGit

Windows Setup

Place the file in your user folder C:\Users\myaccount. Create a bat file jgit.bat in the same directory with following

java -jar C:\Users\myaccount\ %*

Now create a .jgit file and keep it same folder.

acl: private

So at the end of it We have following 3 files in User Directory

Now add C:\Users\myaccount to Path Environment Variable.


For linux you do not need the jgit.bat file. Keep the 2 files in /home/myaccount

sudo ln /home/myaccount/ /usr/bin/jgit
chmod +x /usr/bin/jgit

Run JGit

JGit is same as Git. All the commands that work with git cli work with jgit

jgit --version

Create a git repo

jgit init
jgit add .
jgit remote add origin amazon-s3://
jgit commit -m "initial commit"
jgit push

You can clone the same repo with

jgit clone amazon-s3://