35

I am trying to install the Android SDK and I get the following error in the SDK Manager Logs -

Fetching https://dl-ssl.google.com/android/repository/addons_list-1.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: peer not authenticated
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-5.xml
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-5.xml, reason: peer not authenticated
Done loading packages.

The error has something to do with proxy settings etc. I am running Ubuntu 11.10 and I had installed the SDK comfortably on the same setup yesterday.

Vikesh
  • 2,018
  • 6
  • 23
  • 33

10 Answers10

112

As a workaround, I enabled the "Force https://... sources to be fetched using http://..." setting in the SDK Manager Tools > Options menu.

If you use Android Studio instead of the standalone SDK Manager, Choose "SDK Update Sites" in the "Android SDK" settings and click the checkbox in the lower part of the screen.

That seems to help. I suspect it is a server side problem, but I'm not sure about that.

Edit: Please note that using http instead of https is not really the best idea! In the worst case, a man-in-the-middle attack could inject malicious code into your Android SDK libraries that ends up in your APK. That's why it's called a workaround :)

Danilo Bargen
  • 18,626
  • 15
  • 91
  • 127
2

In my particular case, I had the "Peer not authenticated" error on my android device as the system time on my device was set in the past, no issues with your system time?

Thanks to this page for pointing out the seemingly obvious... :)

mlo55
  • 6,663
  • 6
  • 33
  • 26
  • This was the problem on my Ubuntu VM, wrong time from suspending/wakeup without tools installed to sync clocks. Thanks. – Gringo Suave Sep 01 '15 at 04:14
2

For me, in Windows 7, I had to run the SDK Manager as administrator (right click / run as administrator). From then SKD Manager downloaded and installed just fine.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
Faliorn
  • 1,351
  • 3
  • 12
  • 24
2

I have faced the sam problem in Windows. Then it worked for me after doing the following steps:

  • Open cmd as administrator
  • ping developer.android.com
  • Go to the SDk manager and retry the installation
1

It is very likely that you are getting this when you are within a corporate network and your corporate is using some sort of Browser proxy.

If that is the case and you are using VPN software to get on the corporate network, then disconnect from the VPN to allow your machine to be on the Internet "directly".

tc09
  • 21
  • 2
1

I disabled firewall and then tried running SDK Manager.exe as administrator.It started downloading some packages without fail though some packages are still failing to download with the error "Download interrupted: peer not authenticated". So try to re run the sdk manager again it will download some packages now.

0

For those who have Mac enable "Force https://... sources to be fetched using http://..." going to:

SDK Manager Tools > Preferences > "Force https://... sources to be fetched using http://..."

P.S: Thanks to @danilo-bargen for the answer. He gave the answer for Windows

Jorge Casariego
  • 21,948
  • 6
  • 90
  • 97
0

There is a package ca-certificates-java.

When using OpenJDK, it is installed automatically.
When using the Oracle's JDK with WebUpd8 PPA (Ubuntu), it is not.

Mihai Dinculescu
  • 19,743
  • 8
  • 55
  • 70
Alain
  • 1
0

I solved my problem in this way: First open the date and time settings of your computer and second: update it to the current date and time. Thats all.

Ej Lungay
  • 21
  • 5
0

I choose the "Force https://... sources to be fetched using http://..." option and restarted the "SDK Manager", but it still didn't work. Then I right-clicked on the "Android SDK Tools" --> "SDK Manager" and choose "Run as Administrator". After which, it started to download the packages. I'm on Windows 10.

SPLUS1
  • 61
  • 1
  • 3