收到错误 <“NoneType”对象没有属性“peer_certificate”>当通过 Mercurial 从 google 代码克隆代码时
描述
http克隆时没有错误,仅https克隆时出现错误。
环境
通过mercurial-1.9.1+20110801-py2.6-macosx10.6.mpkg从http://mercurial.berkwood.com/binaries/Mercurial-1.9.1-py2.6-macosx10.6.zip
站点包位置:/Library/Python/2.6/site -packages
命令:
hg clone https://code.google.com/p/cooliris-toolkit/
错误信息
hg clone https://code.google.com/p/cooliris-toolkit/ ** unknown exception encountered, please report by visiting ** http://mercurial.selenic.com/wiki/BugTracker ** Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] ** Mercurial Distributed SCM (version 1.9.1+20110801) ** Extensions loaded: Traceback (most recent call last): File "/usr/local/bin/hg", line 38, in mercurial.dispatch.run() File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 27, in run sys.exit(dispatch(request(sys.argv[1:]))) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 64, in dispatch return _runcatch(req) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 87, in _runcatch return _dispatch(req) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 679, in _dispatch cmdpats, cmdoptions) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 454, in runcommand ret = _runcommand(ui, options, cmd, d) File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 733, in _runcommand return checkargs() File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 687, in checkargs return cmdfunc() File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 676, in d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/Library/Python/2.6/site-packages/mercurial/util.py", line 385, in check return func(*args, **kwargs) File "/Library/Python/2.6/site-packages/mercurial/commands.py", line 1041, in clone branch=opts.get('branch')) File "/Library/Python/2.6/site-packages/mercurial/hg.py", line 217, in clone srcrepo = repository(remoteui(ui, peeropts), source) File "/Library/Python/2.6/site-packages/mercurial/hg.py", line 93, in repository repo = _peerlookup(path).instance(ui, path, create) File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 231, in instance inst._fetchcaps() File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 56, in _fetchcaps self.caps = set(self._call('capabilities').split()) File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 164, in _call fp = self._callstream(cmd, **args) File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 114, in _callstream resp = self.urlopener.open(req) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open response = self._open(req, data) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open '_open', req) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain result = func(*args) File "/Library/Python/2.6/site-packages/mercurial/url.py", line 352, in https_open return self.do_open(self._makeconnection, req) File "/Library/Python/2.6/site-packages/mercurial/keepalive.py", line 256, in do_open self._start_transaction(h, req) File "/Library/Python/2.6/site-packages/mercurial/url.py", line 342, in _start_transaction return keepalive.KeepAliveHandler._start_transaction(self, h, req) File "/Library/Python/2.6/site-packages/mercurial/keepalive.py", line 354, in _start_transaction h.endheaders() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 868, in endheaders self._send_output() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 740, in _send_output self.send(msg) File "/Library/Python/2.6/site-packages/mercurial/url.py", line 129, in _sendfile orgsend(self, data) File "/Library/Python/2.6/site-packages/mercurial/keepalive.py", line 537, in safesend self.connect() File "/Library/Python/2.6/site-packages/mercurial/url.py", line 331, in connect sslutil.validator(self.ui, host)(self.sock) File "/Library/Python/2.6/site-packages/mercurial/sslutil.py", line 97, in __call__ msg = _verifycert(sock.getpeercert(), host) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ssl.py", line 157, in getpeercert return self._sslobj.peer_certificate(binary_form) AttributeError: 'NoneType' object has no attribute 'peer_certificate'
问题
如何解决该错误? python库有冲突吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装 Mercurial (版本 1.9.3) 后,当我 hg clone https 时,我在 Sailing 中遇到了同样的问题://code.google.com/p/vim/
我的解决方案是:
hg clone http://code.google.com/p/vim/
我猜 Mercurial 1.9 .3
sslutil.py 在第 105 行有错误:
peercert = sock.getpeercert(True)
After I installed Mercurial (version 1.9.3), I encountered the same problem with Sailing, when I hg clone https://code.google.com/p/vim/
And my solution is:
hg clone http://code.google.com/p/vim/
I guess Mercurial 1.9.3
sslutil.py has bug in line 105:
peercert = sock.getpeercert(True)