将私有仓库导入 Travis CI/CD 中的另一个私有仓库

时间:2021-02-16 11:43:42

标签: python docker github travis-ci requirements.txt

我有几个已经在 Travis CI/CD 管道中设置得很好的存储库。其中一些存储库是“绿色”的,并且似乎可以正常工作。然而,其中一些存储库依赖于“基础”存储库,这只是另一个私有存储库。我们使用 Guthub 和 Python。

我已尝试通过 requirements.txt 文件 .travis.yml 导入的多种组合。每个存储库中还有 setup.py 个文件。

Travis 网站上的文件迄今未能解决该问题。此外,我不清楚我应该使用 ssh 还是 https。

在 Docker 中,当前配置是这样的:

RUN git clone git@github.mycompany.com:myname/BaseRepo.git --config core.sshCommand="ssh -o 'StrictHostKeyChecking no' -i /opt/app/.ssh/id_ed25519"
ENV NSABASE_PATH "/opt/BaseRepo/"

当前来自 Travis 运行 (git push) 的回溯是:

Cloning into '/home/travis/build/myname/Repo1/submodule/BaseRepo'...
ERROR: Permission to myname/BaseRepo.git denied to deploy key
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.mycompany.com:myname/BaseRepo.git' into submodule path '/home/travis/build/myname/Repo1/submodule/BaseRepo' failed
Failed to clone 'submodule/BaseRepo'. Retry scheduled

谁能指出我在 Travis CI/CD 框架内将存储库从私有 Github 帐户导入到另一个存储库时哪里出错了?

0 个答案:

没有答案
相关问题