2013-07-19 6 views
1

Google FAQ에이 문제에 관한 스레드가 있지만 다른 사용자에게는 만족스러운 답변이 두 개인 것 같습니다. 내 네트워크에는 프록시가 없다는 것이 확실하며 요청에 자격 증명이 표시 될 때 boto를 구성했다고 확신합니다.Google Cloud MissingSecurityHeader 오류

여기에는 gsutil에서 캡처입니다 :

/// 출력이

Creating gs://64/... 
DEBUG:boto:path=/64/ 
DEBUG:boto:auth_path=/64/ 
DEBUG:boto:Method: PUT 
DEBUG:boto:Path: /64/ 
DEBUG:boto:Data: <CreateBucketConfiguration><LocationConstraint>US</LocationConstraint></\ 
CreateBucketConfiguration> 
DEBUG:boto:Headers: {'x-goog-api-version': '2'} 
DEBUG:boto:Host: storage.googleapis.com 
DEBUG:boto:Params: {} 
DEBUG:boto:establishing HTTPS connection: host=storage.googleapis.com, kwargs={'timeout':\ 
70} 
DEBUG:boto:Token: None 
DEBUG:oauth2_client:GetAccessToken: checking cache for key dc3 
DEBUG:oauth2_client:FileSystemTokenCache.GetToken: key=dc3 present (cache_file=/tmp/o\ 
auth2_client-tokencache.1000.dc3) 
DEBUG:oauth2_client:GetAccessToken: token from cache: AccessToken(token=ya29, expiry=2\ 
013-07-19 21:05:51.136103Z) 
DEBUG:boto:wrapping ssl socket; CA certificate file=.../gsutil/third_party/boto/boto/cace\ 
rts/cacerts.txt 
DEBUG:boto:validating server certificate: hostname=storage.googleapis.com, certificate ho\ 
sts=['*.googleusercontent.com', '*.blogspot.com', '*.bp.blogspot.com', '*.commondatastora\ 
ge.googleapis.com', '*.doubleclickusercontent.com', '*.ggpht.com', '*.googledrive.com', '\ 
*.googlesyndication.com', '*.storage.googleapis.com', 'blogspot.com', 'bp.blogspot.com', \ 
'commondatastorage.googleapis.com', 'doubleclickusercontent.com', 'ggpht.com', 'googledri\ 
ve.com', 'googleusercontent.com', 'static.panoramio.com.storage.googleapis.com', 'storage\ 
.googleapis.com'] 
GSResponseError: status=400, code=MissingSecurityHeader, reason=Bad Request, detail=A non\ 
empty x-goog-project-id header is required for this request. 
send: 'PUT /64/ HTTP/1.1\r\nHost: storage.googleapis.com\r\nAccept-Encoding: iden\ 
tity\r\nContent-Length: 98\r\nx-goog-api-version: 2\r\nAuthorization: Bearer ya29\r\nU\ 
ser-Agent: Boto/2.9.7 (linux2)\r\n\r\n<CreateBucketConfiguration><LocationConstraint>US</\ 
LocationConstraint></CreateBucketConfiguration>' 
reply: 'HTTP/1.1 400 Bad Request\r\n' 
header: Content-Type: application/xml; charset=UTF-8^M 
header: Content-Length: 232^M 
header: Date: Fri, 19 Jul 2013 20:44:24 GMT^M 
header: Server: HTTP Upload Server Built on Jul 12 2013 17:12:36 (1373674356)^M 

답변

0

살균 당신이 default_project_id.boto 파일에 지정이 없을 수도 있습니다 것 같습니다.

은 다음과 비슷한 모습이 될 것입니다

[GSUtil] 
default_project_id = 1234567890 

또는 수동으로 프로젝트를 지정하는 gsutil mb 명령에 -p 옵션을 전달할 수 있습니다. gsutil mb 문서에서 :

-p proj_id Specifies the project ID under which to create the bucket. 
+0

요청과 함께 프로젝트 ID를 보내는 것이 트릭을 보냈습니다. 콘솔 (http://code.google.com/apis/console)로 이동 한 후 프로젝트 ID에 대한 프롬프트가 표시되지 않습니다. – user2600958

+0

프로젝트 ID를 전달하는 것이 트릭을 만들었습니다. – user2600958

+0

기꺼이 도와 드리겠습니다. StackOverflow에 오신 것을 환영합니다! – jterrace

관련 문제