最近需要用到Ubuntu,不料遇到了一个奇葩问题,尝试了各种方法没有结果,后来在github上找到了解决方法。原因是https导致的,把证书导入进可以了。参考https://github.com/meteor/meteor/issues/6362#issuecomment-189852511

Step 1:Download the certificate

  • Open Mozilla Firefox :
  • Go to https://repo1.maven.org.
  • Click on the green padlock at the left of adress bar.
  • Click on Details.
  • Click on View certificate.
  • Click on Details.
  • Click on Export.
  • Export file to “X.509 Certificate (PEM) (.crt; .pem)”

Step 2 : Add the certificate to default java keystore

sudo keytool -import -alias MavenRepo -keystore $JAVA_HOME/jre/lib/security/cacerts -file /PATH/TO/YOUR/EXPORTED/FILE.crt

Your $JAVA_HOME variable is normally declared in your .bashrc file, so you can use this command just replacing the /PATH/TO/YOUR/EXPORTED/FILE parameter.

Ubuntu下OpenJDK的默认目录在/usr/lib/jvm/

PS : The default password of java keystore is : changeit

默认的秘钥是changeit,提示输入的时候输入即可。

以上操作重复两遍分别应用于https://jcenter.bintray.com/和https://services.gradle.org/上即可完美解决。

更多相关文章

  1. android 指定打包资源文件的方法
  2. Android开发之EditText属性详解
  3. Android控件的一般属性
  4. Android(安卓)有输入框的页面,一打开就会弹出输入法,最简单屏蔽办
  5. Android(安卓)AutoCompleteTextView的使用
  6. 【转】更换android控件默认样式
  7. Android开机画面修改
  8. 改变ProgressBar默认颜色
  9. Mac 使用MuMu模拟器调试

随机推荐

  1. 深入Android(安卓)【一】 —— 序及开篇
  2. Android(安卓)开发技巧 - Android(安卓)6
  3. android用户界面编程技巧——如何使用Ada
  4. android中APK包的安装以及adb命令的使用
  5. 让Android应用程序支持安装到SD卡(APP2SD)
  6. Android做了一年了,回头来看看Activity
  7. 五步搞定Android开发环境部署——非常详
  8. Android之Http协议编程02
  9. Android(安卓)ListView 自定义用法(ListVi
  10. 【Android(安卓)UI设计与开发】8.顶部标