问题
I'm trying to import my project code for readthedocs
so that it can generate a documentation for me. However, at the stage of cloning the repo, there is already an error:
checkout
-----
Failed to import project; skipping build.
Error
-----
Failed to get code from 'http://mydomain/myproject.git' (git clone): 128
That error code indicates, that the repository is private, and I cannot access it without logging in, unless I have my SSH key that enables a secure connection between my computer and the server. So I generated my key, then added it to my Deploy Keys in the project.
Any reason you can think of why I still cannot access the project's code?
回答1:
The reason it happens, is, that despite I provide a public URL for the project, it still cannot be accessed by anyone who is not a project member, a registered user, or someone who owns a SSH key enabling a secure connection between his computer and the project repo. The readthedocs
documentation is not hosted on my own server, but on readthedocs
servers, so that server would need a SSH key or access to the project, both of which are impossible for me.
So, the only solutions I could think of, is making the project public (which is undesirable, as it is our private company project, and we don't want anyone unwanted to have access to it) or make it available for a certain set of IP addresses, but that only works provided that readthedocs
servers have a fixed, constant IP address.
来源:https://stackoverflow.com/questions/31654785/why-cant-i-clone-a-git-repo-for-readthedocs-to-build-the-documentation