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

Locally hosted RTD instance doesn't allow git file:/// URLs #4061

Closed
michal-gh opened this issue May 4, 2018 · 5 comments
Closed

Locally hosted RTD instance doesn't allow git file:/// URLs #4061

michal-gh opened this issue May 4, 2018 · 5 comments
Labels
Community Effort Needed: patch A pull request is required

Comments

@michal-gh
Copy link

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.

@RichardLitt RichardLitt added Needed: patch A pull request is required Bug A bug labels May 4, 2018
@RichardLitt
Copy link
Member

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?

@michal-gh
Copy link
Author

michal-gh commented May 4, 2018 via email

@davidfischer
Copy link
Contributor

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.

@michal-gh
Copy link
Author

michal-gh commented May 5, 2018

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.

@humitos humitos added Community Effort and removed Bug A bug labels May 8, 2018
@humitos
Copy link
Member

humitos commented May 8, 2018

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.

@agjohnson agjohnson added this to the Development improvements milestone May 31, 2018
@agjohnson agjohnson added Accepted Accepted issue on our roadmap and removed Accepted Accepted issue on our roadmap labels Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Effort Needed: patch A pull request is required
Projects
None yet
Development

No branches or pull requests

5 participants