我的问题是如何在Google Developers Console中正确设置软件包名称和SHA-1证书指纹,以限制我的Android API密钥在我的应用中的使用.
如果我在"限制Android应用的使用限制"部分中没有设置任何内容,我对Google Translate API的请求就能正常运行.API通常使用状态代码200和我的预期结果进行响应.
但是,当我使用Developers Console为我的应用程序指定包名称和SHA-1证书指纹时,我始终获得403 Forbidden响应,如下所示:
HTTP/1.1 403 Forbidden
Vary: Origin
Vary: X-Origin
Content-Type: application/json; charset=UTF-8
Date: Sun, 29 Nov 2015 21:01:39 GMT
Expires: Sun, 29 Nov 2015 21:01:39 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alternate-Protocol: 443:quic,p=1
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Content-Length: 729
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "ipRefererBlocked",
"message": "There is a per-IP or per-Referer restriction configured on your API key and the request …Run Code Online (Sandbox Code Playgroud) 我想知道您是否可以帮我解决以下问题。KMS 和 GCP 中的秘密管理器有什么区别?先感谢您。 https://cloud.google.com/secret-manager/docs/ HB
google-cloud-platform google-cloud-kms google-secret-manager
我正在构建一个简单的脚本,它会轮询一些数据,然后更新我提供给客户的电子表格。(这是一个小项目,我不需要任何花哨的东西。)
因此,我创建了一个 Google Cloud 项目,启用了 Sheets API,并获得了桌面应用程序的凭据。当我尝试运行快速入门示例时,出现错误:
访问被阻止:<我的项目名称>尚未完成 Google 验证过程
我尝试过谷歌搜索,所有的解决方案似乎都是针对用户看到这个应该做什么,但我是开发人员。我只需要授予我自己对此电子表格的访问权限,因为我的脚本是唯一会更改它的东西(我还将与客户共享它)。
我该怎么办?
我有一个看起来像这样的Kubernetes部署(用'....'替换名称和其他东西):
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "3"
kubernetes.io/change-cause: kubectl replace deployment ....
-f - --record
creationTimestamp: 2016-08-20T03:46:28Z
generation: 8
labels:
app: ....
name: ....
namespace: default
resourceVersion: "369219"
selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/....
uid: aceb2a9e-6688-11e6-b5fc-42010af000c1
spec:
replicas: 2
selector:
matchLabels:
app: …Run Code Online (Sandbox Code Playgroud) 我正在尝试在GCE Kubernetes中设置Ingress.但是当我访问Ingress中定义的IP地址和路径组合时,我不断收到以下502错误:
这是我跑步时得到的: kubectl describe ing --namespace dpl-staging
Name: dpl-identity
Namespace: dpl-staging
Address: 35.186.221.153
Default backend: default-http-backend:80 (10.0.8.5:8080)
TLS:
dpl-identity terminates
Rules:
Host Path Backends
---- ---- --------
*
/api/identity/* dpl-identity:4000 (<none>)
Annotations:
https-forwarding-rule: k8s-fws-dpl-staging-dpl-identity--5fc40252fadea594
https-target-proxy: k8s-tps-dpl-staging-dpl-identity--5fc40252fadea594
url-map: k8s-um-dpl-staging-dpl-identity--5fc40252fadea594
backends: {"k8s-be-31962--5fc40252fadea594":"HEALTHY","k8s-be-32396--5fc40252fadea594":"UNHEALTHY"}
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
15m 15m 1 {loadbalancer-controller } Normal ADD dpl-staging/dpl-identity
15m 15m 1 {loadbalancer-controller } Normal CREATE ip: 35.186.221.153
15m 6m 4 {loadbalancer-controller } …Run Code Online (Sandbox Code Playgroud) google-compute-engine google-cloud-platform kubernetes google-kubernetes-engine
我无法找到有关如何将GCF与Google Cloud Endpoints连接的文档.据我所知,可以将Google Cloud Endpoints配置为访问内部云资源.目前尚不清楚如何将负载均衡器与端点服务一起使用.
在使用Cloud Datastore构建可伸缩Web应用程序文章中,它表明您应该能够配置从云端点到云功能的直接连接.没有迹象表明您需要在它们之间安装任何计算引擎或其他基础设施.是否有关于如何将云端点连接到云功能的文档或教程?有人设法连接这两项服务吗?
google-cloud-endpoints google-cloud-datastore google-cloud-platform google-cloud-functions
谷歌宣布了Firestore,这是一个新的文档数据存储区.
我已经使用Google Cloud Datastore开发了一个应用程序超过六个月了,在阅读博客之后,我觉得Firestore似乎是一个更好的选择.
备用集合 - 文档 - 子集合的概念对我来说非常好,因为在为数据存储区设计模式时,我知道我将无法查询嵌套字段.现在使用firestore子集合,我获得了完整的查询功能,这对我来说是一个游戏规则改变者(我可以用最少的查询获得最大数据).
作为反驳论点,流程图建议我使用数据存储区,因为我没有任何移动客户端.
像Datastore一样使用Firestore是个好主意吗?(我会方便地忽略移动客户端/实时更新/同步功能!)
firebase google-cloud-datastore google-cloud-platform google-cloud-firestore
sudo apt update在Debian上运行时出现以下错误.
GPG error: http://packages.cloud.google.com/apt cloud-sdk-stretch InRelease:
The following signatures were invalid: EXPKEYSIG 3746C208A7317B0F
Run Code Online (Sandbox Code Playgroud) 在 github 操作中,我正在运行一个尝试使用 github 到 GCP 联合 ID 的操作:
# see https://github.com/marketplace/actions/authenticate-to-google-cloud#setup
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
workload_identity_provider: 'projects/1234/locations/global/workloadIdentityPools/my-github-pool/providers/my-github-oidc-provider'
service_account: 'my-github-sa@projxyz.iam.gserviceaccount.com'
Run Code Online (Sandbox Code Playgroud)
我越来越:
Run google-github-actions/auth@v0
Error: google-github-actions/auth failed with: retry function failed after 1 attempt:
gitHub Actions did not inject $ACTIONS_ID_TOKEN_REQUEST_TOKEN or
$ACTIONS_ID_TOKEN_REQUEST_URL into this job.
This most likely means the GitHub Actions workflow permissions are incorrect, or this job is being run from a fork.
For more information, please see https://docs.github.com/en/actions/security-guides/automatic-
token-authentication#permissions-for-the-github_token
Run Code Online (Sandbox Code Playgroud)
我正在查看引用的文档,但没有看到任何有用的内容。
如何让 …
在google cloud gui控制台中,我访问了"IAM&admin">"服务帐户",并使用查看者角色创建了一个名为"my-service-account"的服务帐户.
然后我运行了这个命令:
gcloud iam service-accounts get-iam-policy my-service-account@mydomain.iam.gserviceaccount.com
Run Code Online (Sandbox Code Playgroud)
并看到了这个输出:
etag: ACAB
Run Code Online (Sandbox Code Playgroud)
根据文档,这意味着此服务帐户没有与之关联的策略.所以我给它分配了一个"角色",不包括在其"政策"中.
如何列出与服务帐户关联的角色?