MyBinder incorrectly parse links from URL mybinder.org/v2/git/
See original GitHub issueHello! I have several repositories running on my own GitLab server on Azure. All MyBinder links recently stopped working. For example the link (to reproduce, try random repo from GitLab.com or your own git: https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.com%2FG5Fr3%2Fanalog-clock/master It immediately starts with error:
Error resolving ref for git:https:/gitlab.com/G5Fr3/analog-clock/master: Unable to run git ls-remote to get the
resolved_ref
: ssh:Could not resolve hostname https: Name or service not known fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.
When I add an extra %2F, it works perfectly and launches Binder. https://mybinder.org/v2/git/https%3A%2F%2F%2Fgitlab.com%2FG5Fr3%2Fanalog-clock/master
All my links used to work in past, but today all of them throw the same error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
@betatim thanks a lot for all the debug information, it made things much easier to find out the problem. I think it is solved now, https://gesis.mybinder.org/build/git/https%3A%2F%2Fgitlab.com%2FG5Fr3%2Fanalog-clock/master works for me.
The problem was that in our nginx configuration
proxy_pass
is specified with URI:and
proxy_pass
normalizes (decodes) the URI (see documentation) and this was the issue, because launch urls have encoded parts for git or gitlab repo providers.Using $request_uri in proxy_pass solved the issue
I have checked the links and all seems to work again. Thank you fast response and fixing the bug.