我无法通过rstudio桌面使用ga_auth()进行身份验证。
我尝试使用rstudio.cloud,身份验证起作用了:
> ga_auth()
ℹ 2020-08-14 12:56:19 > Default Google Project for googleAnalyticsR is set.
ℹ 2020-08-14 12:56:19 > Setting client.id from options(googleAuthR.client_id)
Is it OK to cache OAuth access credentials in the folder '/home/rstudio-user/.R/gargle/gargle-oauth' between R sessions?
1: Yes
2: No
Selection: 1
httpuv not installed, defaulting to out-of-band authentication
Enter authorization code: xxxxxx如果我在我的rstudio桌面上尝试同样的操作,我会收到以下消息:
> ga_auth()
i 2020-08-14 14:42:29 > Default Google Project for googleAnalyticsR is set.
i 2020-08-14 14:42:29 > Setting client.id from options(googleAuthR.client_id)
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Fehler: Could not authenticate via any gargle cred function不同的是,我被直接转发到浏览器身份验证。身份验证后,我收到消息"Fehler: C‘t authenticate via any gargle cred function“,并且路径"C:\Users\xv12345.R\gargle\gargle-oauth”中没有存储任何文件。
你知道为什么云可以工作而桌面不能工作吗?也许是我公司的防火墙问题?
谢谢!
发布于 2020-09-29 08:29:02
是的,这很可能是防火墙问题。也许可以尝试使用不同的API进行身份验证,看看是否有类似的问题。
https://stackoverflow.com/questions/63445726
复制相似问题