Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL verification errors when running kitty +kitten themes on 0.23.0 #3936

ahmedelgabri opened this issue Aug 16, 2021 · 7 comments


Copy link

Describe the bug
Running kitty +kitten themes errors out with this error

▲ kitty +kitten themes

Traceback (most recent call last):
  File "lib/python3.9/urllib/", line 1346, in do_open
  File "lib/python3.9/http/", line 1253, in request
  File "lib/python3.9/http/", line 1299, in _send_request
  File "lib/python3.9/http/", line 1248, in endheaders
  File "lib/python3.9/http/", line 1008, in _send_output
  File "lib/python3.9/http/", line 948, in send
  File "lib/python3.9/http/", line 1422, in connect
  File "lib/python3.9/", line 500, in wrap_socket
  File "lib/python3.9/", line 1040, in _create
  File "lib/python3.9/", line 1309, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "lib/python3.9/kittens/themes/", line 227, in fetch
  File "lib/python3.9/kittens/themes/", line 380, in load_themes
  File "lib/python3.9/kittens/themes/", line 115, in fetch_themes
  File "lib/python3.9/urllib/", line 214, in urlopen
  File "lib/python3.9/urllib/", line 517, in open
  File "lib/python3.9/urllib/", line 534, in _open
  File "lib/python3.9/urllib/", line 494, in _call_chain
  File "lib/python3.9/urllib/", line 1389, in https_open
  File "lib/python3.9/urllib/", line 1349, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)>

Failed to download themes
Press Enter to quit.

To Reproduce
Steps to reproduce the behavior:

  1. Open kitty
  2. run kitty +kitten themes

Screenshot 2021-08-16 at 09 41 27

Environment details

kitty 0.23.0 created by Kovid Goyal
Darwin pandoras-box 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64
ProductName:	macOS ProductVersion:	11.5 BuildVersion:	20G71
Loaded config files:

Config options different from defaults:
active_border_color             None
allow_remote_control            y
bold_font                       PragmataPro Mono Liga Bold
bold_italic_font                PragmataPro Mono Liga Bold Italic
clipboard_control               ('write-clipboard', 'write-primary', 'no-append')
cursor_stop_blinking_after      0
enable_audio_bell               False
font_family                     PragmataPro Mono Liga
{'PragmataProMonoLiga-Regular': ('+ss13',)}
font_size                       12.0
force_ltr                       True
hide_window_decorations         1
italic_font                     PragmataPro Mono Liga Italic
kitty_mod                       8
macos_custom_beam_cursor        True
macos_option_as_alt             3
macos_thicken_font              1.1
macos_traditional_fullscreen    True
scrollback_fill_enlarged_window True
scrollback_lines                20000
select_by_word_characters       :@-./_~?&=%+#
strip_trailing_spaces           smart
tab_activity_symbol             ▲
tab_bar_edge                    1
update_check_interval           0.0
window_alert_on_bell            False
window_margin_width             FloatEdges(left=10.0, top=10.0, right=10.0, bottom=10.0)
window_padding_width            FloatEdges(left=10.0, top=10.0, right=10.0, bottom=10.0)
Added mouse actions:
	 cmd+b1 repeat ungrabbed KeyAction('mouse_click_url')
	 cmd+b1 repeat grabbed KeyAction('mouse_click_url')
	 cmd+b1 press grabbed KeyAction('mouse_discard_event')
	 alt+cmd+b1 press ungrabbed KeyAction('mouse_selection', (2,))
Added shortcuts:
	ctrl+i KeyAction('send_text', ('application', b'H'))
	cmd+. KeyAction('move_tab_forward')
	cmd+[ KeyAction('previous_window')
	cmd+] KeyAction('next_window')
	cmd+` KeyAction('move_window_to_top')
	cmd+a > 1 KeyAction('set_background_opacity', ('1',))
	cmd+a > d KeyAction('set_background_opacity', ('default',))
	cmd+a > l KeyAction('set_background_opacity', ('-0.1',))
	cmd+a > m KeyAction('set_background_opacity', ('+0.1',))
	cmd+b KeyAction('move_window_backward')
	cmd+e KeyAction('kitten', ('hints',))
	cmd+f KeyAction('move_window_forward')
	cmd+h KeyAction('previous_window')
	cmd+j KeyAction('scroll_line_down')
	cmd+k KeyAction('scroll_line_up')
	cmd+l KeyAction('next_layout')
	cmd+o KeyAction('pass_selection_to_program')
	cmd+p > f KeyAction('kitten', ('hints', '--type path --program -'))
	cmd+p > h KeyAction('kitten', ('hints', '--type hash --program -'))
	cmd+p > l KeyAction('kitten', ('hints', '--type line --program -'))
	cmd+p > n KeyAction('kitten', ('hints', '--type linenum'))
	cmd+p > w KeyAction('kitten', ('hints', '--type word --program -'))
	cmd+p > y KeyAction('kitten', ('hints', '--type hyperlink'))
	cmd+p > shift+f KeyAction('kitten', ('hints', '--type path'))
	cmd+q KeyAction('close_tab')
	cmd+s KeyAction('paste_from_selection')
	cmd+u KeyAction('input_unicode_character')
	cmd+escape KeyAction('kitty_shell', ('window',))
	cmd+backspace KeyAction('change_font_size', (True, None, 0.0))
	cmd+delete KeyAction('clear_terminal', ('reset', True))
	cmd+left KeyAction('previous_tab')
	cmd+right KeyAction('next_tab')
	cmd+f2 KeyAction('edit_config_file')
	cmd+f5 KeyAction('load_config_file')
	cmd+f6 KeyAction('debug_config')
	cmd+f10 KeyAction('toggle_maximized')
	cmd+f11 KeyAction('toggle_fullscreen')
	cmd+kp_subtract KeyAction('change_font_size', (True, '-', 2.0))
	cmd+kp_add KeyAction('change_font_size', (True, '+', 2.0))
	shift+cmd+h KeyAction('show_scrollback')
	alt+cmd+t KeyAction('set_tab_title')
Removed shortcuts:
	shift+ctrl++ KeyAction('change_font_size', (True, '+', 2.0))
	shift+ctrl+, KeyAction('move_tab_backward')
	shift+ctrl+- KeyAction('change_font_size', (True, '-', 2.0))
	shift+ctrl+. KeyAction('move_tab_forward')
	shift+ctrl+0 KeyAction('tenth_window')
	shift+ctrl+1 KeyAction('first_window')
	shift+ctrl+2 KeyAction('second_window')
	shift+ctrl+3 KeyAction('third_window')
	shift+ctrl+4 KeyAction('fourth_window')
	shift+ctrl+5 KeyAction('fifth_window')
	shift+ctrl+6 KeyAction('sixth_window')
	shift+ctrl+7 KeyAction('seventh_window')
	shift+ctrl+8 KeyAction('eighth_window')
	shift+ctrl+9 KeyAction('ninth_window')
	shift+ctrl+= KeyAction('change_font_size', (True, '+', 2.0))
	shift+ctrl+[ KeyAction('previous_window')
	shift+ctrl+] KeyAction('next_window')
	shift+ctrl+` KeyAction('move_window_to_top')
	shift+ctrl+a > 1 KeyAction('set_background_opacity', ('1',))
	shift+ctrl+a > d KeyAction('set_background_opacity', ('default',))
	shift+ctrl+a > l KeyAction('set_background_opacity', ('-0.1',))
	shift+ctrl+a > m KeyAction('set_background_opacity', ('+0.1',))
	shift+ctrl+b KeyAction('move_window_backward')
	shift+ctrl+c KeyAction('copy_to_clipboard')
	shift+ctrl+e KeyAction('open_url_with_hints')
	shift+ctrl+f KeyAction('move_window_forward')
	shift+ctrl+h KeyAction('show_scrollback')
	shift+ctrl+j KeyAction('scroll_line_down')
	shift+ctrl+k KeyAction('scroll_line_up')
	shift+ctrl+l KeyAction('next_layout')
	shift+ctrl+n KeyAction('new_os_window')
	shift+ctrl+o KeyAction('pass_selection_to_program')
	shift+ctrl+p > f KeyAction('kitten', ('hints', '--type path --program -'))
	shift+ctrl+p > h KeyAction('kitten', ('hints', '--type hash --program -'))
	shift+ctrl+p > l KeyAction('kitten', ('hints', '--type line --program -'))
	shift+ctrl+p > n KeyAction('kitten', ('hints', '--type linenum'))
	shift+ctrl+p > w KeyAction('kitten', ('hints', '--type word --program -'))
	shift+ctrl+p > y KeyAction('kitten', ('hints', '--type hyperlink'))
	shift+ctrl+p > shift+f KeyAction('kitten', ('hints', '--type path'))
	shift+ctrl+q KeyAction('close_tab')
	shift+ctrl+r KeyAction('start_resizing_window')
	shift+ctrl+s KeyAction('paste_from_selection')
	shift+ctrl+t KeyAction('new_tab')
	shift+ctrl+u KeyAction('kitten', ('unicode_input',))
	shift+ctrl+v KeyAction('paste_from_clipboard')
	shift+ctrl+w KeyAction('close_window')
	shift+ctrl+escape KeyAction('kitty_shell', ('window',))
	shift+ctrl+enter KeyAction('new_window')
	shift+ctrl+backspace KeyAction('change_font_size', (True, None, 0.0))
	shift+ctrl+delete KeyAction('clear_terminal', ('reset', True))
	shift+ctrl+left KeyAction('previous_tab')
	shift+ctrl+right KeyAction('next_tab')
	shift+ctrl+up KeyAction('scroll_line_up')
	shift+ctrl+down KeyAction('scroll_line_down')
	shift+ctrl+page_up KeyAction('scroll_page_up')
	shift+ctrl+page_down KeyAction('scroll_page_down')
	shift+ctrl+home KeyAction('scroll_home')
	shift+ctrl+end KeyAction('scroll_end')
	shift+ctrl+f2 KeyAction('edit_config_file')
	shift+ctrl+f5 KeyAction('load_config_file')
	shift+ctrl+f6 KeyAction('debug_config')
	shift+ctrl+f10 KeyAction('toggle_maximized')
	shift+ctrl+f11 KeyAction('toggle_fullscreen')
	shift+ctrl+kp_subtract KeyAction('change_font_size', (True, '-', 2.0))
	shift+ctrl+kp_add KeyAction('change_font_size', (True, '+', 2.0))
	shift+alt+ctrl+t KeyAction('set_tab_title')
Changed shortcuts:
	cmd+, KeyAction('move_tab_backward')
	cmd+w KeyAction('close_window')
	background                      #111111   
	color0                          #1d1f21   
	color1                          #cc6666   
	color10                         #99cc99   
	color11                         #ffcc66   
	color12                         #6699cc   
	color13                         #cc99cc   
	color14                         #66cccc   
	color15                         #dddddd   
	color2                          #b5bd68   
	color3                          #f0c674   
	color4                          #81a2be   
	color5                          #b294bb   
	color6                          #8abeb7   
	color7                          #c5c8c6   
	color8                          #333333   
	color9                          #f2777a   
	cursor                          #20bbfc   
	foreground                      #c5c8c6   
	inactive_tab_background         #1d1f21   

Additional context
The same happens with kitty --config NONE. I also tested on two separate machines. Same issue on both.

Copy link

You will need to install an CA cerificates bundle say via homebrew or
something similar. Then set the SSL_CERT_FILE environment variable so
kitty can find the certificates.

I will look into bundling them with kitty for the next release.

Copy link

@kovidgoyal Thank you for this 0.23.0 update. I cannot wait to try the new theme feature. I met the same errors when I ran kitty +kitty themes. And I cannot find the CA certificates in homebrew. Do you know what the name is for this cert bundle in homebrew? Hope the next update including this bundle can be released soon.

Copy link

@kovidgoyal since themes should be added to ~/.config/kitty/themes per the documentation shouldn't p here do this too?

Screenshot 2021-08-16 at 21 46 02

Because right now it will just add the theme to ~/.config/kitty, because right now I have my custom themes inside ~.config/kitty/themes/ then whatever I choose will be inside ~/.config/kitty. Which seems a bit odd & defies the purpose of the themes folder.

Copy link

@ahmedelgabri No ~/.config/kitty/themes is for themes you want to make accessible to the themes kitten (or override the themes of the same name from the kitty-themes repo), not for themes kitty is currently using.


curl > cacert.pem && SSL_CERT_FILE=cacert.pem kitty +kitten themes

Copy link

I've stepped through all of the suggested troubleshooting tips and am still running into urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)>. Anything else I can try?

Copy link

having the same issue , tried everything above.

Copy link

B1T3X commented Mar 20, 2023

I've stepped through all of the suggested troubleshooting tips and am still running into urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)>. Anything else I can try?

Same, I tried every piece of advice I could get my hands on, but facing the self-signed certificate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

6 participants