无法在readthedocs本地服务器上克隆私有github存储库

时间:2017-04-13 18:17:00

标签: django-allauth read-the-docs

我已经安装了readthedocs local server我无法通过 django-allauth 从我的组织构建私有github存储库

我在所有存储库中都有管理员权限,并且我在管理面板中配置了django-allauth:

  • 客户端ID 密钥添加到"admin/socialaccounts/socialapplications"
  • 访问令牌添加到"admin/socialaccounts/socialtoken"
  • 将以下配置添加到"admin/oauth/remoterepository"

enter image description here

每次我尝试构建存储库时,都会出现以下错误:

Failed to import project: Failed to get code from 'https://github.com/my-organization/my-project.git' (git clone): 128 git 
clone error output: fatal: could not read Username for 'https://github.com': No such device or address

有人知道为什么会这样吗?有人能够在类似的场景中使用组织内的私有存储库配置本地readthedocs服务器吗?

1 个答案:

答案 0 :(得分:1)

我修复了添加标志的问题:

ALLOW_PRIVATE_REPOS = True 

进入我的设置文件 my-project / readthedocs / settings / local_settings.py 。这将激活Github存储库的 x-oauth-basic URL,允许我使用我的Github个人访问令牌来克隆存储库。我刚刚使用以下格式更新了 admin / oauth / remoterepository 上的存储库克隆网址字段:

https://<your token>:x-oauth-basic@github.com/my-organization/my-project.git