为什么我不能克隆git repo以供readthedocs构建文档? [英] Why can't I clone a git repo for readthedocs to build the documentation?

查看:93
本文介绍了为什么我不能克隆git repo以供readthedocs构建文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试导入 readthedocs 的项目代码,以便它可以为我生成文档。但是,在克隆存储库的阶段,已经存在错误:

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

该错误代码表示存储库是私有的,除非登录,否则我无法登录而不访问它我的SSH密钥,用于在计算机和服务器之间建立安全连接。所以我生成了密钥,然后将其添加到项目中的部署密钥中。

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?

推荐答案

它发生的原因是,尽管我为该项目提供了公共URL,但非项目成员,注册用户或拥有SSH密钥的人,从而可以在其计算机和项目存储库之间建立安全连接。 readthedocs 文档不是托管在我自己的服务器上,而是托管在 readthedocs 服务器上,因此该服务器将需要SSH密钥或访问该项目,这对我来说都是不可能的。

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.

因此,我能想到的唯一解决方案是将项目公开(这是不受欢迎的,因为这是我们的私人公司项目,我们不希望任何人不需要访问它)或使其可用于某些IP地址,但这仅在 readthedocs 服务器具有固定的恒定IP地址的情况下有效。

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.

这篇关于为什么我不能克隆git repo以供readthedocs构建文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆