Readthedocs.org: Locally hosted RTD instance doesn't allow git file:/// URLs

Created on 4 May 2018  Â·  5Comments  Â·  Source: readthedocs/readthedocs.org

Details

I installed a local RTD instance according to the Installation guide and imported test project. Now, I want to import my git project manually,

Expected Result

I expected that the instance should accept all valid Git URLs.

Actual Result

When I enter file:///.../../x.git URL, the manual import page shows "Invalid scheme for URL" error. I checked that I can clone this URL from a terminal.

Community Effort patch

All 5 comments

Makes sense to me. It should be easy to grep for the git logic we use for Git urls, and then to extend that to match this protocol. Would you be interested in helping with a PR?

Yes, I can help with a PR. Let me look at the code...

sob., 5 maj 2018, 00:34 użytkownik Richard Littauer <
[email protected]> napisaÅ‚:

Makes sense to me. It should be easy to grep for the git logic we use for
Git urls, and then to extend that to match this protocol. Would you be
interested in helping with a PR?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rtfd/readthedocs.org/issues/4061#issuecomment-386751897,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJfmUSSktUPlqpUQhCXyaxOHrWxDzcBaks5tvNd1gaJpZM4TzPy_
.

These are disallowed on readthedocs.org for security reasons. If the work here gets completed it should probably be an option that is disabled by default.

git file:/// URLs only make sense on local rtd instances, when the instance is on the same machine as a Git repo. They certainly are a security risk on public-facing servers.
However, many people have their local repos on a development machine and may want to install a local instance and generate a set of docs. Currently, after installation of a new instance, it's impossible to manually import a project without exposing the repo on the net, which is a hassle and and also a security risk. I think this use case may be common enough to justify an install option which unblocks git file:/// URLs during the installation. As @davidfischer points out, this option should be disabled by default.

I'm re labelling this since it's not a bug in RTD but a feature that is useful for local RTD installation. Marking as Community Effort.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidism picture davidism  Â·  4Comments

humitos picture humitos  Â·  3Comments

enielse picture enielse  Â·  4Comments

davidfischer picture davidfischer  Â·  4Comments

humitos picture humitos  Â·  4Comments