Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Amazon S3 Object Interaction(How to seamlessly upload repository objects to AmazonS3)
Amazon S3 Object Interaction [message #1454630] Tue, 28 October 2014 15:53 Go to next message
russell shirey is currently offline russell shireyFriend
Messages: 4
Registered: September 2014
Junior Member
I have been trying to implement the Amazon S3 uploads am getting lost in the API. From the AmazonS3.java file, it looks like I can use :

public void put(final String bucket, final String key, final byte[] data), but how do I know what the name of the key is?

Is there an automatic way to upload the entire repo? I figured out how to do most of the basic git commands (init, commit, add, etc)... and I can open an existing repo:

File repodir = new File("E:\\gitrepo\\.git");

FileRepositoryBuilder builder = new FileRepositoryBuilder();
Repository repository = builder.setGitDir(repodir)
.readEnvironment() // scan environment GIT_* variables
.findGitDir() // scan up the file system tree
.build();
System.out.println("Having repository: " + repository.getDirectory());
Git git = new Git(repository);

But let's say how do I get from this to uploading this repo to AmazonS3? Further, I saw there's encryption with Amazon S3 and wondering how would I use that.
Re: Amazon S3 Object Interaction [message #1455938 is a reply to message #1454630] Wed, 29 October 2014 22:49 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
did you read Shawn's blog on that topic
http://blog.spearce.org/2008/07/using-jgit-to-publish-on-amazon-s3.html
Re: Amazon S3 Object Interaction [message #1455995 is a reply to message #1455938] Thu, 30 October 2014 00:10 Go to previous messageGo to next message
russell shirey is currently offline russell shireyFriend
Messages: 4
Registered: September 2014
Junior Member
Hi, thanks for your response. I've seen a lot of information similar to what is contained in this blog. I'm looking for essentially doing the same thing but using just Java code rather than the command line interface. I'm getting lost in the API. It seems you have to use the AmazonS3, AmazonTransport, and some other classes as well and I'm having trouble putting it all together.
Re: Amazon S3 Object Interaction [message #1461308 is a reply to message #1455995] Tue, 04 November 2014 12:27 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Look at the classes in org.eclipse.jgit.pgm (JGit's Java implementation of git command line)
which implement what Shawn described in his blog.
Previous Topic:JGit HTTPS cloning is not working
Next Topic:Error validating settings: Not Found
Goto Forum:
  


Current Time: Tue Apr 16 09:58:43 GMT 2024

Powered by FUDForum. Page generated in 0.04701 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top