Can't embed from GitHub
-
I can’t seem to be able to embed anything from GitHub. I have no problem embedding a video from youtube, though.
Is there anything I need to do with the GitHub API on either end or anything else? Let me know if you need any more info.
-
Can you send me the shortcode you are using for the embed? If you could also include the repository you are trying to embed from GitHub that would be great as well.
Thanks!
Either
[embedGitHubReadme owner="jquery" repo="jquery" cache_id="jquery"]
or
[embedGitHubReadme owner="jquery" repo="jquery" cache_id="123"]
or
[embedGitHubReadme owner="FortAwesome" repo="Font-Awesome" cache_id="123"]
won’t work for me. Neither will any other repository.What other plugins do you have enabled on your site? I tested the embeds you provided on my own testing site and they all worked – so either the theme or another one of the plugins is conflicting with mine.
Do you know if any of the other shortcodes provided with my plugin work? Also do you know if for some reason CURL is disabled on your server?
If you want to weed out the problem yourself the first step would probably be to deactivate all plugins except for mine, see if that works, then activate the other plugins one by one. You should be able to narrow down what’s causing the problem from there.
If you have any kind of error log and can give me a copy of that I might be able to help more as well.
I disabled every plugin except this one and it still does not display anything.
The video embedding from YouTube using your plugin works fine.I have WordPress 4.3.1 running Twenty Fifteen theme.
I also enabled debugging and logging and there are no errors shown for your plugin.
Can you check if cURL is available on your server? The API calls are done with cURL so this is one of the only problems I could see still getting in the way of the plugin working.
The other option we could do is you could email me your login info and FTP info to alex@dobsondev.com and I could take a look at everything myself.
Thanks!
cURL support enabled
cURL Information 7.42.1Features
AsynchDNS Yes
CharConv No
Debug No
GSS-Negotiate No
IDN Yes
IPv6 Yes
krb4 No
Largefile Yes
libz Yes
NTLM Yes
NTLMWB No
SPNEGO Yes
SSL Yes
SSPI Yes
TLS-SRP NoLooks like cURL is enabled and turned on no problem.
I will send you an email.I emailed back and forth with Jacob and we figured out the problem but I thought that I would include it here in case anyone searches.
The problem occurred because cURL was unable to verify the certificate provided by the server. This can be solved in two different ways:
1. Use curl with CURLOPT_SSL_VERIFYPEER => false which allows curl to make insecure connections, that is curl does not verify the certificate.
2. Add the root CA (the CA signing the server certificate) to etc/ssl/certs/ca-certificates.crt
I will do an update later today that allows for an option to allow insecure connections if the user needs to do that. The default cURL calls in both the GitHub Readme and GitHub File Contents shortcodes will still be secure.
If you do need to use insecure connection then use the following syntax (this is an example using Font Awesome): [embedGitHubReadme owner=”FortAwesome” repo=”Font-Awesome” insecure=“true”]
The topic ‘Can't embed from GitHub’ is closed to new replies.