使用google驱动器凭据和google earth引擎的RStudio出错
我不熟悉R编程,正在尝试执行一个R代码,在那里我可以访问google drive和google earth引擎。然而,有两种情况正在发生:首先,我在家里的个人笔记本电脑上运行代码,代码工作正常,甚至不打开浏览器请求访问权限。 而在第二种情况下,当我使用远程桌面连接并访问该公司的计算机时,代码无法获得google凭据 可能是什么?它是与远程访问相关还是与软件包版本相关?以下是数据: 在我的个人笔记本电脑中:使用google驱动器凭据和google earth引擎的RStudio出错,r,google-drive-api,credentials,google-earth-engine,gargle,R,Google Drive Api,Credentials,Google Earth Engine,Gargle,我不熟悉R编程,正在尝试执行一个R代码,在那里我可以访问google drive和google earth引擎。然而,有两种情况正在发生:首先,我在家里的个人笔记本电脑上运行代码,代码工作正常,甚至不打开浏览器请求访问权限。 而在第二种情况下,当我使用远程桌面连接并访问该公司的计算机时,代码无法获得google凭据 可能是什么?它是与远程访问相关还是与软件包版本相关?以下是数据: 在我的个人笔记本电脑中: > ## Initialize GEE ---- > ee_Initializ
> ## Initialize GEE ----
> ee_Initialize(email = gee_email, drive = TRUE)
-- rgee 1.0.9 ------------------------------------------------------------ earthengine-api 0.1.248 --
√ email: my.email@colaborator.company.br
√ Google Drive credentials: FOUND
√ Initializing Google Earth Engine: DONE!
√ Earth Engine user: users/rcode
-----------------------------------------------------------------------------------------------------
通过远程桌面连接在公司计算机中输入相同的代码:
> ## Initialize GEE ----
> ee_Initialize(email = gee_email, drive = TRUE)
-- rgee 1.0.9 ------------------------------------------------------------------------------- earthengine-api 0.1.263 --
√ email: my.email@colaborator.company.br
√ Google Drive credentials:Erro: Can't get Google credentials.
Are you running googledrive in a non-interactive session? Consider:
* `drive_deauth()` to prevent the attempt to get credentials.
* Call `drive_auth()` directly with all necessary specifics.
* Read more in: https://gargle.r-lib.org/articles/non-interactive-auth.html
在执行以下命令之后:
选项(漱口安静=假)
googledrive::drive_auth(“我的。email@colaborator.company.br))
希望这条线能帮助你。错误仍然存在。:'(
drive\u auth(use\u oob=TRUE)
>令牌获取()捕获的错误token\u fetch()
:>无法连接到accounts.google.com端口443:超时,更多错误与上述错误相同。
> trying `token_fetch()`
> trying `credentials_service_account()`
> Error caught by `token_fetch()`:
Argument 'txt' must be a JSON string, URL or file.
> trying `credentials_app_default()`
> trying `credentials_gce()`
> trying `credentials_byo_oauth()`
> Error caught by `token_fetch()`:
inherits(token, "Token2.0") is not TRUE
> trying `credentials_user_oauth2()`
> Gargle2.0 initialize
> attempt to access internal gargle data from: googledrive
> adding 'userinfo.email' scope
> loading token from the cache
> no matching token in the cache
> initiating new token
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
> Error caught by `token_fetch()`:
Failed to connect to accounts.google.com port 443: Timed out
Erro: Can't get Google credentials.
Are you running googledrive in a non-interactive session? Consider:
* `drive_deauth()` to prevent the attempt to get credentials.
* Call `drive_auth()` directly with all necessary specifics.
* Read more in: https://gargle.r-lib.org/articles/non-interactive-auth.html