首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在CircleCI中使用私有存储库?

如何在CircleCI中使用私有存储库?
EN

Stack Overflow用户
提问于 2018-02-07 03:31:29
回答 1查看 11.7K关注 0票数 9

我是红矿山插件的测试人员。我想测试所有插件。

为了做到这一点,我在一个插件的存储库(由Github管理)下设置了.循环往复/config.yml,并尝试进行测试。但我收到了错误信息。

代码语言:javascript
运行
复制
    #!/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

我想找出如何获得与我现在使用的存储库不同的私有存储库的克隆。

下面是我的.循环往复/config.yml。

代码语言:javascript
运行
复制
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
EN

回答 1

Stack Overflow用户

发布于 2018-02-18 21:21:26

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

票数 12
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48655525

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档