JGit S3支持唯一的标准美桶? [英] JGit S3 support for Standard-US buckets only?

查看:140
本文介绍了JGit S3支持唯一的标准美桶?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

难道possbile使用除了美国标准的其他地方的S3桶与JGit(即通过配置文件等),还是我做错了什么吗?

如果我尝试使用S3桶JGit位于欧盟,jgit抛出一个错误

   - > jgit起源推主
计数对象:3
查找来源:100%(3/3)
获取尺寸:100%(2/2)
玉米pressing对象:100%(1/1)
写对象:100%(3/3)
显示java.lang.NullPointerException
    在org.eclipse.jgit.transport.AmazonS3.error(AmazonS3.java:518)
    在org.eclipse.jgit.transport.AmazonS3.putImpl(AmazonS3.java:505)
        ...
 

但是,当我尝试使用位于美国标准的水桶,然后一切工作正常。

   - >混帐推起源主
计数对象:3
查找来源:100%(3/3)
获取尺寸:100%(2/2)
玉米pressing对象:100%(1/1)
写对象:100%(3/3)
放包-132548a..idx:100%(1/1)
亚马逊-S3://.jgit@usreponame/chef-receipes.git
 * [新分支]大师 - >主
 

解决方案

NullPointerException异常发生,因为在JGit的一个错误。该女将S3 API返回一个code既不是200或500,并JGit试图从连接读取错误流,而不是防范空错误流。

我已经推了建议修复此问题这里

在此更改应用的实际响应code应该出现在异常消息,希望这将使它清楚为什么它是失败的。

Is it possbile to use other locations besides US-standard for S3 buckets with JGit (ie. through the config file etc.) or am I doing something wrong here?

If I try to use a S3 bucket with JGit that is located in EU, jgit throws an error

-> jgit push origin master
Counting objects:       3
Finding sources:        100% (3/3)
Getting sizes:          100% (2/2)
Compressing objects:    100% (1/1)
Writing objects:        100% (3/3)
java.lang.NullPointerException
    at org.eclipse.jgit.transport.AmazonS3.error(AmazonS3.java:518)
    at org.eclipse.jgit.transport.AmazonS3.putImpl(AmazonS3.java:505)
        ...

But when I try to use a bucket that is located in US-Standard, then everything works fine.

-> git push origin master
Counting objects:       3
Finding sources:        100% (3/3)
Getting sizes:          100% (2/2)
Compressing objects:    100% (1/1)
Writing objects:        100% (3/3)
Put pack-132548a..idx:  100% (1/1)
To amazon-s3://.jgit@usreponame/chef-receipes.git
 * [new branch]      master -> master

解决方案

The NullPointerException is occurring because of a bug in JGit. The Amazone S3 API is returning a code that is neither a 200 or a 500 and JGit is trying to read the error stream from the connection and is not guarding against a null error stream.

I have pushed a proposed fix for this issue here.

Once this change is applied the actual response code should appear in the exception message which will hopefully make it clear why it is failing.

这篇关于JGit S3支持唯一的标准美桶?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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