Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JohnYangSam opened this issue Feb 23, 2025 · 0 comments

Comments

@JohnYangSam
Copy link

JohnYangSam commented Feb 23, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant