Android Studio:服务器的证书不受信任 [英] Android Studio: Server's certificate is not trusted

查看:226
本文介绍了Android Studio:服务器的证书不受信任的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

忽略此警告是否安全?当我在 Android Studio 中创建一个新项目时它会出现:

Is it safe to ignore this warning? It shows up when I create a new project in Android Studio:

Server's certificate is not trusted

Certificate details

Issued To

CN (Common Name)       *.google.com
O (Organization)       Google Inc
L (Locality)           Mountain View
C (Country)            US
ST (State or Province) California

Issued By

CN (Common Name)       Google Internet Authority G2
O (Organization)       Google Inc
C (Country)            US

Validity Period

Valid from:            9/24/14
Valid until:           12/23/14

...

日期看起来没问题,我检查了计算机的日期设置以确认.否则为什么会不可信"?

The date looks alright and I checked my computer's date settings to be sure. Why else would it be "not trusted"?

推荐答案

Android Studio 有服务器证书的配置(这也适用于其他 IntelliJ 平台,如 PyCharm)

Android Studio has a configuration for Server Certificates (This works for other IntelliJ platforms like PyCharm as well)

转到文件->设置.在IDE 设置部分选择服务器证书

注意:较新的 IntelliJ 位于 File->Settings->Tools->Server Certificates 中,如评论中所述.

NOTE: Newer IntelliJ it is in File->Settings->Tools->Server Certificates as mentioned in the comments.

我自己 我刚刚选中了自动接受复选框,点击应用,并且从来没有处理过它.如果您担心安全性,还可以选择在它们出现时一次添加 1 个.

Myself I just selected the Accept Automatically check box, hit Apply and never had to deal with it. If you are worried about security, there is also the option to add them 1 at a time as they come up.

就我而言,我这样做是因为我已经将 *.google.com 证书配置为已接受,但我仍然收到了弹出窗口.我怀疑指纹改变了,如果我删除然后接受错误就会消失,但我决定通过选中复选框让它消失.

In my case I did this because I already had a *.google.com certificate configured as accepted, but I still got the popup. I suspect that the fingerprint changed and if I would have deleted and then accepted the error would have gone away, but I decided to just make it go away by selecting the check box.

这篇关于Android Studio:服务器的证书不受信任的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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