Skip to content

fatal: not a git repository when using checkout@v2 #363

Open
@DannyFriedmanQC

Description

@DannyFriedmanQC

I am trying to run git commands in an action using checkout@v2 but I am getting the error

fatal: not a git repository

My yaml looks like the following

name: name
on: [push, pull_request]
jobs: 
  some_job:
    name: some_name
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: some_name
         run: |
           git status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions