CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
409 stars 232 forks source link

/bin/bash: git: command not found #384

Closed ursaleotim closed 4 years ago

ursaleotim commented 4 years ago

tim@DESKTOP-HUCQDLR:~/ursaLeo/unity-test$ circleci local execute -c process.yml --job unity-ci/outputAlf
Docker image digest: sha256:2c2fd6a4655b259ac40f3c168b82200d4a7cebdc8287c4eb866a348b0191403d
====>> Spin Up Environment
Build-agent version  ()
Docker Engine Version: 19.03.8
Kernel Version: Linux 7b2fb95aeee5 4.19.84-microsoft-standard #1 SMP Wed Nov 13 11:44:37 UTC 2019 x86_64 Linux
Starting container gableroux/unity3d:2019.1.0f2
  image is cached as gableroux/unity3d:2019.1.0f2, but refreshing...
2019.1.0f2: Pulling from gableroux/unity3d
Digest: sha256:b4f3bb32e1c92f671dbf9a197250870f84755c1d968b8612925d851c9b46517d
Status: Image is up to date for gableroux/unity3d:2019.1.0f2
  using image gableroux/unity3d@sha256:b4f3bb32e1c92f671dbf9a197250870f84755c1d968b8612925d851c9b46517d
====>> Preparing Environment Variables
Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1584369042
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=unity-ci/outputAlf
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=https://github.com/UrsaLeo/unity-test.git
  CIRCLE_SHA1=3b9d1c754d2f86785de31ef566dd0315a8e9fbc1
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1584369042
  CIRCLE_WORKING_DIRECTORY=~/project

The redacted variables listed above will be masked in run step output.====>> Setup a remote Docker engine
{"Runner":true,"level":"error","msg":"running as root","task-id":"localbuild-1584369042","time":"2020-03-16T14:30:45Z"}
Using local docker engine bind-mounted
====>> Checkout code
  #!/bin/bash -eo pipefail
mkdir -p /root/project && cd /tmp/_circleci_local_build_repo && git ls-files | tar -T - -c | tar -x -C /root/project && cp -a /tmp/_circleci_local_build_repo/.git /root/project
/bin/bash: git: command not found
Error:
Exited with code exit status 127

Step failed
Error: runner failed (exited with 101)
Task failed
Error: task failed

my .yml:

version: 2.1

orbs:
  unity-ci: mizotake/unity-ci@0.1.3

executors:
  unity_executor:
    docker:
      - image: gableroux/unity3d:2019.1.0f2

workflows:
  version: 2
  unity-ci-activate-ulf-file:
    jobs:
      - unity-ci/outputAlf:
          exec: unity_executor

tim@DESKTOP-HUCQDLR:~$ circleci version
0.1.6949+d951526
tim@DESKTOP-HUCQDLR:~$ circleci diagnostic

---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /home/tim/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
Error: please set a token with 'circleci setup'
You can create a new personal API token here:
https://circleci.com/account/api
FelicianoTech commented 4 years ago

This is because git in not installed in the Docker image you are using, gableroux/unity3d:2019.1.0f2.

gmemstr commented 4 years ago

Closing as this is not related to the CLI as far as I can tell.