Skip to content

Instantly share code, notes, and snippets.

@tyru
Created March 19, 2011 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyru/877384 to your computer and use it in GitHub Desktop.
Save tyru/877384 to your computer and use it in GitHub Desktop.
diff --git a/plugin/gist.vim b/plugin/gist.vim
index 574b7e8..ffc276f 100644
--- a/plugin/gist.vim
+++ b/plugin/gist.vim
@@ -556,6 +556,11 @@ function! s:GistPost(user, token, content, private)
let quote = &shellxquote == '"' ? "'" : '"'
let url = 'https://gist.github.com/gists'
let res = system('curl -i -d @'.quote.file.quote.' '.url)
+ echohl Error
+ for _ in split(res, '\n')
+ echom _
+ endfor
+ echohl None
call delete(file)
let res = matchstr(split(res, '\(\r\?\n\|\r\n\?\)'), '^Location: ')
let res = substitute(res, '^[^:]\+: ', '', '')
curl: (60) SSL certificate problem, verify that the CA cert is OK
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). The default
bundle is named curl-ca-bundle.crt; you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
@Ritik-gh
Copy link

Ritik-gh commented Feb 7, 2023

Thanks a lot for adding this, this diff file helped me sharing a diff which is something I was struggling with . 🙏

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