So, I have downloaded the jgit.sh file (https://eclipse.org/jgit/download/) and am trying to use it to store a repository within Amazon S3.
I am on Windows 10 with the following Java runtime:
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
I have created a local Git test repository.
F:\#Downloads\JGit\afolder>git status
On branch master
nothing to commit, working directory clean
I have specified the remote repository URL that I would like to push to:
F:\#Downloads\JGit\afolder>git remote -v
origin amazon-s3://secret@git.test/ (fetch)
origin amazon-s3://secret@git.test/ (push)
The AWS account I am using should have access to the git.test bucket.
This is what I get when I try and push to the S3 bucket:
F:\#Downloads\JGit\afolder>java -cp F:\#Downloads\JGit\\jgit.sh org.eclipse.jgit.pgm.Main push origin master
org.eclipse.jgit.api.errors.TransportException: amazon-s3://git.test//objects: error in packed-refs
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:164)
at org.eclipse.jgit.pgm.Push.run(Push.java:130)
at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:199)
at org.eclipse.jgit.pgm.Main.execute(Main.java:246)
at org.eclipse.jgit.pgm.Main.run(Main.java:138)
at org.eclipse.jgit.pgm.Main.main(Main.java:110)
Caused by: org.eclipse.jgit.errors.TransportException: amazon-s3://git.test//objects: error in packed-refs
at org.eclipse.jgit.transport.WalkRemoteObjectDatabase.readPackedRefs(WalkRemoteObjectDatabase.java:433)
at org.eclipse.jgit.transport.TransportAmazonS3$DatabaseS3.readAdvertisedRefs(TransportAmazonS3.java:311)
at org.eclipse.jgit.transport.TransportAmazonS3.openPush(TransportAmazonS3.java:211)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:155)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1250)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:157)
... 5 more
Caused by: java.io.IOException: Reading of '/packed-refs' failed: 403 Forbidden
at org.eclipse.jgit.transport.AmazonS3.error(AmazonS3.java:527)
at org.eclipse.jgit.transport.AmazonS3.get(AmazonS3.java:299)
at org.eclipse.jgit.transport.TransportAmazonS3$DatabaseS3.open(TransportAmazonS3.java:285)
at org.eclipse.jgit.transport.WalkRemoteObjectDatabase.openReader(WalkRemoteObjectDatabase.java:365)
at org.eclipse.jgit.transport.WalkRemoteObjectDatabase.readPackedRefs(WalkRemoteObjectDatabase.java:423)
... 10 more
Caused by: java.io.IOException:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>D4C469A1471BFA57</RequestId><HostId>THRefkTC6doabYZqxoqIMoyNyEh4cXcFqbOqj7mcOsNvI7+t/f9oWVcaYQdGONluQRpkLlywm1s=</HostId></Error>
at org.eclipse.jgit.transport.AmazonS3.error(AmazonS3.java:546)
... 14 more
Any ideas what could have gone wrong? JGit setup problem, AWS setup problem or something else?
Any assistance would be very much appreciated!