• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Google Bucket Can't verify storage credentials...

Status
Not open for further replies.

neoark

Chevereto Member
I am trying to add google bucket but it seems like its not working. Is there a way to debug this issue?

Thanks
 
Google Cloud is kinda hard to make it work. Most likely you aren't using a service account.
 
Ops pasted wrong log earlier. It seems to do the upload but can't delete the file?

2015/05/08 17:25:18 [error] 7154#0: *126 FastCGI sent in stderr: "PHP message: exception 'Google_Service_Exception' with message 'Error calling DELETE https://www.googleapis.com/storage/v1/b/imges-link/o/Chevereto_test_2015-05-08_05h25m18s.png: (404) Not Found' in /var/www/html/app/vendor/google/Http/REST.php:110
Stack trace:
#0 /var/www/html/app/vendor/google/Http/REST.php(62): Google_Http_REST::decodeHttpResponse(Object(Google_Http_Request), Object(Google_Client))
#1 [internal function]: Google_Http_REST::doExecute(Object(Google_Client), Object(Google_Http_Request))
#2 /var/www/html/app/vendor/google/Task/Runner.php(174): call_user_func_array(Array, Array)
#3 /var/www/html/app/vendor/google/Http/REST.php(46): Google_Task_Runner->run()
#4 /var/www/html/app/vendor/google/Client.php(590): Google_Http_REST::execute(Object(Google_Client), Object(Google_Http_Request))
#5 /var/www/html/app/vendor/google/Service/Resource.php(228): Google_Client->execute(Object(Google_Http_Request))
#6 /var/www/html/app/vendor/google/Service/Storage.php(1690): Google_Service_Resource->call('de" while reading response header from upstream, client: 173.245.54.216, server: imges.link, request: "POST /json HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "imges.link", referrer: "http://imges.link/dashboard/settings/external-storage"
 
Last edited:
Don't know actually. I tested this thing several times and now is not working. I will keep looking.
 
Can you try replacing the storage class with this one?

app/lib/classes/class.storage.php
 

Attachments

  • class.storage.zip
    5.8 KB · Views: 3
I will try it out there is something wrong with api services. I am getting Backend Error no new projects. Issue could be related to me. I will investigate more and post back.
 
I will try it out there is something wrong with api services. I am getting Backend Error no new projects. Issue could be related to me. I will investigate more and post back.

When you grant access, you are granting the user permission to access the object using OAuth2 credentials.
The Developers Console performs this authentication behind the scenes, but Chrome doesn't know anything about it, which is why the link you showed doesn't work.

Without granting the user access to the project itself (at which point they would be able to use the console browser), you need the user to use a tool that understands OAuth2, such as gsutil.

You could also leverage the console's behind-the-scenes OAuth2 by providing the user with a link from within the console itself, such as: https://console.developers.google.com/m/cloudstorage/b/your-bucket-name/o/your-object-name - this should work in Chrome provided the user is logged in.

Finally, another option for accessing via Chrome is to use Cookie auth as described here https://developers.google.com/storage/docs/authentication.
Then you can provide a URL of the form: https://storage.cloud.google.com/your-bucket-name/your-object-name

If you choose the gsutil route, you need to run:
gsutil config

To set up gsutil to use your credentials (same goes for the user you want to grant access to).

Also try to use the gsutil tool, as such:
gsutil acl ch -u your@gmail.com:R gs://finance-marketing

More info here: https://cloud.google.com/storage/docs/collaboration


Cheers!
 
Is not that complicated.

This issue should be fixed with the file that I've attached. I noticed that some keys are generated with encoded entities and those won't work. In the patch I mimic the original JSON and use the built-in json decode to properly handle the Google Cloud secret key.
 
Status
Not open for further replies.
Back
Top