Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Google App Engine: How to get Storage Access with the help of a Service Account

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3
    • 0
    • 105
    Comment on it

    First get logged in to a GCE instance via SSH. From there you can access the Storage with the help of a Service Account:

    Step 1:  Open Command line of google app engine and enter following command.

              $ sudo gcloud auth login

    Step 2: Login to gmail by copying the url for authentication and after login with gmail you will get the code. Copy the code and paste it and hit enter

    Step 3: Now Write the following command

           $sudo gsutil cp /var/www/sliderVideos/thumb/201504100904091029698703.png gs://amuk

    Write the following code in php to test, whether you are able to copy the files to directory to "amuk" directory created in google storage (Google App Engine)

    <?php
    
    $output = exec ('sudo gsutil cp /var/www/sliderVideos/thumb/201504100904091029698703.png gs://amuk');
    echo "<pre>$output</pre>";
    ?>

    Now you can see that you are able to access the storage account. Please have a look on the screen shots attached below

     

     

    Google App Engine: How to get Storage Access with the help of a Service Account

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: