我是Redmine插件的测试人员。我想测试所有插件。

为此,我在一个插件的存储库(由Github管理)下设置了.circleci/config.yml并尝试进行测试。但是我得到以下错误信息。

    #!/bin/bash -eo pipefail
    git clone https://github.com/xxxxxx/lad.git
    Cloning into 'lad'...
    ERROR: Repository not found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    Exited with code 128

我想找出获取私有(private)存储库克隆的方法,这些克隆不同于我现在使用的存储库。

以下是我的.circleci/config.yml现在。
version: 2

jobs:
  build:
    docker:
      - image: ruby:2.3.0
        environment:
      - LANG: C.UTF-8
    environment:
      BUNDLE_GEMFILE: /root/project/.circleci/Gemfile
    steps:
      - checkout
      - run: git clone --depth=1 --branch=${REDMINE_VERSION:-3.4-stable} https://github.com/redmine/redmine.git
      # this is private repository ↓
      - run: git clone https://github.com/xxxxxx/lad.git
      - run:
          name: Check status
          command: |
            pwd
            ls -al

最佳答案

您需要向CircleCI添加一个私有(private)SSH key ,该 key 可以访问您要克隆的GitHub存储库。这可以通过项目设置页面中的CircleCI Web应用程序完成。此处更多信息:https://circleci.com/docs/2.0/gh-bb-integration/#enable-your-project-to-check-out-additional-private-repositories

关于github - 如何在CircleCI中使用私有(private)存储库?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48655525/

10-13 07:02