我在组织(比如 ORG)中有 2 个私有 GitHub 存储库(比如 A 和 B)。存储库 A 在requirements.txt以下位置具有存储库 B :
-e git+git@github.com:ORG/B.git#egg=B
Run Code Online (Sandbox Code Playgroud)
我对 A (in .github/workflows/test.yml)有以下工作流程:
name: Python package
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install requirements
run: |
pip install -r requirements.txt
- name: Test with pytest
run: |
pytest ./tests
Run Code Online (Sandbox Code Playgroud)
由于 B 是私有的,因此安装失败。
如果他们在同一组织中,是否可以在此工作流中测试 A 时安装 B?如何?
我正在尝试在 Github actions 中克隆另一个私有仓库。我已经设置SECRET_USER并SECRET_PASSWORD在存储库的秘密中运行操作。在操作中我正在运行命令
git clone https://$SECRET_USER:$SECRET_PASSWORD@github.com/other-organization/other-repo.git
Run Code Online (Sandbox Code Playgroud)
但出现错误
Cloning into 'other-repo'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/other-organization/other-repo.git/'
##[error]Process completed with exit code 128.
Run Code Online (Sandbox Code Playgroud)
在 Github Actions 中,尽管我已经验证用户可以访问https://github.com/other-organization/other-repo(这显然不是内部存储库的真实 URL)。