【发布时间】:2020-05-25 18:28:55
【问题描述】:
我在使用 bigrquery 从我编写的 R Markdown 文档中连接到 GCP 服务帐户时遇到问题。当我从控制台尝试时,身份验证工作正常。两者都有
library(bigrquery)
bq_auth()
和
library(bigrquery)
bq_auth(email="my-service-account-email@myproject.iam.gserviceaccount.com")
启动带有对话框的浏览器,让我可以按预期使用指定的帐户进行选择和验证。但是在 R Markdown 中,任何尝试都像
options("httr_oob_default" = TRUE)
bq_auth(email="my-service-account-email@myproject.iam.gserviceaccount.com")
甚至像这样使用完整列表
bq_auth(
email = "my-service-account-email@myproject.iam.gserviceaccount.com",
path = NULL,
scopes = c("https://www.googleapis.com/auth/bigquery"),
cache = gargle::gargle_oauth_cache(),
use_oob = gargle::gargle_oob_default(),
token = NULL
)
导致错误
Error: Can't get Google credentials.
Are you running bigrquery in a non-interactive session? Consider:
* Call `bq_auth()` directly with all necessary specifics.
谁能看到我错过了什么?提前致谢。
【问题讨论】:
标签: r authentication google-bigquery bigrquery