Closed ghost closed 6 years ago
You're almost there, the .Renviron.txt
file should be called just .Renviron
though. Rename it, start R and then you should be ok.
If that doesn't work, please paste the contents of that file too.
Oh yes, sorry for that. I fixed it, so now I get the following error:
2017-12-04 15:00:49> No environment argument found, looked in GCE_AUTH_FILE Set default project ID to '*' Set default zone to 'europe-west1-a'
Tried to enter full file location like "C:/R-proj/.../.json" and short one ".json" Also thought maybe there are some problems with that json file, so got new one, but still the same issue
UPDATE Alright, I fixed previous problem by renaming my .json file. It had "-" symbol, so I had to remove it. So now it looks like this:
library(googleComputeEngineR) Setting scopes to https://www.googleapis.com/auth/cloud-platform Successfully authenticated via test.json Set default project ID to 'test' Set default zone to 'europe-west1-a' gce_auth() Error: gce_auth() is defunct. Authenticate instead by downloading your JSON key and placing in a GCE_AUTH_FILE environment argument. See https://cloudyr.github.io/googleComputeEngineR/articles/installation-and-authentication.html or vignette('installation-and-authentication', package = 'googleComputeEngineR')
Can I see the contents of your .Renviron
? It also needs to be in the right place, easiest if using RStudio is to click on the "Home" breadcrumb link and put it there.
It should look something like this:
GCE_AUTH_FILE="C://location-of-json"
GCE_DEFAULT_PROJECT_ID="mark-xxxxxxx"
GCE_DEFAULT_ZONE="europe-west1-a"
It looks like the default project ID isn't being seen either.
.Renviron looks like this:
GCE_AUTH_FILE="test.json" GCE_DEFAULT_PROJECT_ID="test" GCE_DEFAULT_ZONE="europe-west1-a"
So, after removing "-" symbol from the .json file name authentification was completed (updated my last post), but the issues is still here
Error: gce_auth() is defunct
Oh, once you have that all done, you don't need to use gce_auth()
at all - it is auto authenticated.
Oh, I see. Thank you so much for your time
So it is almost working now
Request failed [403]. Retrying in 1 seconds... Request failed [403]. Retrying in 3.2 seconds... 2017-12-04 16:09:55> Request Status Code: 403 Scopes: https://www.googleapis.com/auth/cloud-platform Method: service_json Error: API returned: Required 'compute.projects.get' permission for 'projects/test'
The "test" needs to be a valid google project id, you can use the same one that you downloaded the with file from.
Think this is sorted now?
Hey Mark,
I am trying to launch RStudio Server with the help of googleComputeEngineR. But so far I can't authorize. My script codes looks like this: library(googleComputeEngineR)
The issue I got is
I've tried to create a .Renviron.txt file in project folder and put the gce_* attributes there, but still got the same problem.
I hope I could help with that,
Ruslan