LoginSignup
0
0

More than 3 years have passed since last update.

CircleCiでis not empty and not a git repository エラー

Posted at

概要

CircleCiのチェックアウトで下記エラーがでてしまう

Directory (/go/src) you are trying to checkout to is not empty and not a git repository
circleci/config.yml
version: 2
jobs:
〜〜〜〜〜略〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜
   steps:
      - checkout
〜〜〜〜〜略〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜

結論

メッセージの通りなのですが、
コンテナのworking_directoryが空でないため、githubからcheckout出来ないため、
working_directoryを配下を空にするか、他のからのディレクトリを指定するとエラーは解消となります。

参考:解決例

参考までに今回自分の解決した例を載せておきます。

    working_directory: /go/src
    ↓
    working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}

circleciの設定で{{ORG_NAME}}と{{REPO_NAME}}を見かけますが、
最初見たとき、何をどこで設定すればいいんだよ!!ってなって悩んでしまったのですが、
circleci側で自動的に設定が行われており問題なく、動きます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0