在Eclipse git中使用native git not jgit? [英] Using native git not jgit in Eclipse git?

查看:158
本文介绍了在Eclipse git中使用native git not jgit?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法配置egit来使用你的native(OS)git而不是jgit的实现?如果没有,是否有任何替代的git Eclipse插件?



编辑#1 - 我应该注意,AWS CodeCommit使用凭证助手 for auth,from .gitconfig:

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

我猜这是CodeCommit特有的东西,不在jgit中。

解决方案

EGit 严格使用 JGit ,Git的Java实现。



Aptana Sudio3 似乎嵌入到产品来源( git hub.com/aptana/studio3 ),但使用本机Git。



有一个类 jgit.transport.AmazonS3 ,如此问题这个(设置IAM)



有一个有趣的讨论这可以提供补丁的线索:


查看 JGit如何访问S3主机,JGit尝试使用虚拟托管风格请求访问存储桶 - http://bucketname.s3.amazonaws.com/ - 此请求样式适用于美国标准区域中的桶,但对于其他区域,S3将其与HTTP 307重定向重定向到正确的区域。



似乎jgit不正确处理这个HTTP 307重定向,需要实现行为来正确处理重定向到S3



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.

解决方案

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.

这篇关于在Eclipse git中使用native git not jgit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆