google-services.json是机密的吗? [英] Is google-services.json confidential?

查看:101
本文介绍了google-services.json是机密的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遵循有关在Android应用中设置Google Analytics(分析)的指南( https://developers.google .com/analytics/devguides/collection/android/v4/)我不知道此google-services.json文件是否可以安全地提交到源代码版本控制中并推送到公共GitHub存储库中,或者该文件是否可以包含凭据或机密.

Following the guide on setting up Google Analytics in an Android app (https://developers.google.com/analytics/devguides/collection/android/v4/) I am left wondering if this google-services.json file can safely be committed into source code versioning and pushed to a public GitHub repository or if this file may contain credentials or secrets.

我在其他地方找不到明确的答案,但是我可以看到示例应用程序都提交了文件(

I cannot find a definite answer elsewhere, but I can see that sample apps both commit the file (https://github.com/google/climb-tracker/blob/master/mobile/google-services.json) and others have added the file to their .gitignore.

推荐答案

应视为机密.生成的json文件包含一个api_key,可用于发送推送通知.

It should be considered confidential. The json file that is generated contains an api_key that you can use to send push notifications.

如果转到Google Developer Console上的凭据"页面,您将在API keys

If you go to Credentials page on the Google Developer Console, you'll see the key in the json file listed under API keys

这篇关于google-services.json是机密的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆