I have been trying to find a way to git to the AWS S3 bucket. While searching, I found this blog: https://fancybeans.com/2012/08/24/how-to-use-s3-as-a-private-git-repository/.
As per the blog says:
I have created S3 bucket (test-git-repo) and a folder inside (testing) and an IAM user with S3 bucket access
I have downloaded jgit-3.7.1 in my `/bin´ folder renamed as git.
created a
.git_s3_public
file and added both access keys saved in/home/ubuntu
with600
permissionin
/home/ubuntu/
I have created a directorys3-git
and added some files withgit init git add * git commit -m "my new files yay!" git remote add s3 amazon-s3://.jgit_s3_public@test-git-repo/tesing/s3-git jgit push s3 refs/heads/master
When I'm doing jgit push
I'm getting the below error:
java.lang.IllegalStateException: Cannot set value to a final field 'org.eclipse.jgit.pgm.Push.refSpecs'.
at org.kohsuke.args4j.spi.Setters.create(Setters.java:32)
at org.kohsuke.args4j.ClassParser.parse(ClassParser.java:38)
at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:96)
at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:71)
at org.eclipse.jgit.pgm.opt.CmdLineParser.<init>(CmdLineParser.java:119)
at org.eclipse.jgit.pgm.opt.CmdLineParser.<init>(CmdLineParser.java:102)
at org.eclipse.jgit.pgm.TextBuiltin.parseArguments(TextBuiltin.java:224)
at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:208)
at org.eclipse.jgit.pgm.Main.execute(Main.java:223)
at org.eclipse.jgit.pgm.Main.run(Main.java:124)
at org.eclipse.jgit.pgm.Main.main(Main.java:98)
I have downloaded the .jar files for slf4j-jdk14.jar, slf4j-simple.jar, slf4j-api.jar of version 1.7.5 and put them in /bin/ folder.
Still I'm getting the same error. I have tried a simple command
jgit config
still the same error
Can anybody help me out here to solve this issue or any other way to git to S3.