10

Is there any way to configure egit to use your native (OS) git and not the jgit implementation? If not, are there any alternative git Eclipse plugins?

EDIT #1 - I should note, AWS CodeCommit uses a credential helper for auth, from .gitconfig:

[credential]
    helper = !/usr/local/bin/aws --profile CodeCommitProfile codecommit credential-helper $@
    UseHttpPath = true

I'm guessing this is something specific to CodeCommit and is not in jgit.

peterh
  • 11,875
  • 18
  • 85
  • 108
javamonkey79
  • 17,443
  • 36
  • 114
  • 172
  • FWIW, I'm getting "git-upload-pack not permitted" when trying to clone a repository. I'm using Amazon codeCommit so the authentication is not the typical username and password. – javamonkey79 Mar 16 '15 at 21:49
  • 2
    EGit uses JGit and cannot be configured to use native Git. [Aptana Studio](http://www.aptana.com/products/studio3/download.html) comes with a plug-in that uses native Git but I don't know if it can be used outside of Aptana Studio. Other native Git clients I know of don't integrate with the Eclipse workspace. Are you sure that the _git-upload-pack not permitted_ is a shortcoming of JGit that cannot be worked around and will working in native Git? – Rüdiger Herrmann Mar 17 '15 at 08:44
  • @RüdigerHerrmann "git-upload-pack not permitted" is the error I get when trying to clone a repository. I get other authentication errors when trying to push\pull as well. I think this is because amazon code commit uses IAM auth, and jgit does not work with it for some reason. – javamonkey79 Mar 17 '15 at 17:07
  • JGit can [fetch and push from/to Amazon S3](http://blog.spearce.org/2008/07/using-jgit-to-publish-on-amazon-s3.html) Not sure if this is the same as _IAM_. If so however, it looks as if the described techinque can be used to authenticate from within EGit as well. – Rüdiger Herrmann Mar 17 '15 at 17:40

1 Answers1

7

EGit strictly uses JGit, the Java implementation of Git.

The Git plugin in Aptana Sudio3 seems to be embedded in the product sources (github.com/aptana/studio3), but uses a native Git.

There is a class jgit.transport.AmazonS3, as illustrated in this question and this one (setting IAM).

There is an interesting discussion in this thread which can offer a clue as to what to patch:

Having looked at how JGit access the S3 host, JGit tries to access the bucket using virtual hosted style requests - http://bucketname.s3.amazonaws.com/ - this request style works fine with buckets in the US Standard zone, but for other regions S3 redirects it with HTTP 307 redirect to the correct region.

It seems that jgit does not handle this HTTP 307 redirect correctly, and will need to implement behavior to correctly handle redirects by S3.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Interesting. Thanks for your clarifications. See my edit regarding credential helper. – javamonkey79 Mar 19 '15 at 07:55
  • @javamonkey79 I confirm the credential helper is not part of EGit/JGit: you would need to tweak that credential helper (or deactivate it for test) in order to see if the error persists. – VonC Mar 19 '15 at 13:14