Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Referenced from https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000094584/comments/115000405564
# Get the certification of the google.com
echo -n | openssl s_client -connect google.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/google.cer
# Navigate to the jre security directory insides the Android Studio
cd "/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/jre/lib/security"
# Move the certification to current directory
mv ~/google.cer .
# Backup the cacerts file
cp cacerts cacerts-backup
# Import and trust the certification, note that the default password is "changeit"
keytool -keystore cacerts -importcert -alias google -file google.cer
# Now you can restart your Android Studio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment