导航

code.google.com certificate error: certificate is for www.google.com

Posted on 2014-11-19 08:52  蝈蝈俊  阅读(750)  评论(0编辑  收藏  举报

有时候我们会碰到下面错误:code.google.com certificate error: certificate is for www.google.com,类似如下:

D:\>go get code.google.com/p/go-charset
# cd .; hg clone -U https://code.google.com/p/go-charset d:\mycodes\golang\src\code.google.com\p\go-charset
abort: code.google.com certificate error: certificate is for www.google.com
(configure hostfingerprint a9:89:3c:56:04:8b:0f:2c:84:6c:41:06:92:73:5a:92:e9:8e
:17:ad or use --insecure to connect insecurely)
package code.google.com/p/go-charset: exit status 255

 

解决方法:

http://www.cnblogs.com/slider/archive/2012/03/06/2381448.html

改用下面命令下载:

hg clone http://code.google.com/p/go-charset

我们这里不走 https, 改走 http 就可以解决这个问题。

我这里由于把所有google的域名,都通过一个特殊的ip访问,所以 升级 Mercurial  工具到最新版本,并不能解决这个问题。

D:\>hg version
Mercurial Distributed SCM (version 3.1.2)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2014 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

D:\>hg version
分布式软件配置管理工具 - 水银 (版本 3.2)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2014 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.