Skip to content

fatal: not a git repository (or any of the parent directories): .git git-crypt: Error: 'git status' failed - is this a Git repository? #20

@JohnYangSam

Description

@JohnYangSam

I'm trying to use the action on self-hosted runner and it seems like the action doesn't recognize the git repository?

Error:

Run pwd
  pwd
  ls -a
.git
....

Run sliteteam/github-action-git-crypt-unlock@1.3.0
fatal: not a git repository (or any of the parent directories): .git
git-crypt: Error: 'git status' failed - is this a Git repository?

Portion of the github action .yml:

on:
  push:
    branches:
      - production
  workflow_dispatch:

permissions:
  contents: read

jobs:
  deploy:
    runs-on: self-hosted
    env:
      GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_BH_KEY_BASE64_ENCODED }}
 # Steps
    steps:
      # Checkout latest code
      # See: https://github.com/actions/checkout
      - name: Checkout source code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0 # Fetch all history so we can git-crypt unlock it

      # Init repo so we can git-crypt unlock it
      - name: Debugging
        run: |
          pwd
          ls -a

      - name: Decrypt git-crypt variables
        uses: sliteteam/github-action-git-crypt-unlock@1.3.0
        env:
          GIT_DISCOVERY_ACROSS_FILESYSTEM: 1

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