github-action-git-crypt-unlock icon indicating copy to clipboard operation
github-action-git-crypt-unlock copied to clipboard

Does not work with a git-crypt key file

Open inspectorG4dget opened this issue 3 years ago • 0 comments

Steps to reproduce:

  1. Create the key file locally, using git-crypt export-key git-crypt-key
  2. Stash this key in an S3 bucket or other remote location of choice

This works:

steps:
  - ...
  - name: git-crypt unlock
    run: |
      git clone https://github.com/AGWA/git-crypt.git
      cd git-crypt
      make
      sudo make install
      cd ..
      rm -rf git-crypt
      git-crypt unlock git-crypt-key

This does not work

steps:
  - name: Set git-crypt key
    id: ref
    run: echo "::set-output name=git_crypt_key::$(base64 git-crypt-key)"  # or cat git-crypt-key | base64
  - name: decrypt
    uses: sliteteam/[email protected]
    env:
      GIT_CRYPT_KEY: ${{ steps.ref.outputs.git_crypt_key }}

inspectorG4dget avatar Mar 24 '21 18:03 inspectorG4dget